Ending a while loop inside a while loop

How do I make a while loop run as long as the while loop that contains it is running? I tried wiring both conditional terminals to a stop button in the outer loop, but that doesnt seem to work? Is there another way?
Thanks.

Hi Jasonalan,
I am not sure what you are trying to implement, but it is true that the loops are not terminating because of data dependency. The stop button in the outer loop will not be read until the inner loop terminates.
If you wish to terminate the two nested loops using a single stop button, you should read the stop button inside the inner loop and wire it to the conditional terminals in both the inner and outer loop. Again, there is no point in doing this unless you have some other logic along with the stop button to stop the loops. If only the stop button is being used to stop both the inner and outer loops, the outer loop will only execute once. In that case, you can just use a sequence structure followed by a single while loop.

Similar Messages

  • Crackle at the end of a loop

    There is always a quiet but annoying crackle at the end of my loops when I record from a real instrument.
    What can I do?

    I haven't noticed a "crackle" but I have noticed that sometimes when I create a loop it ends up with its tail chopped off. And when this happens, these loops have the missing tail added to the front of the loop.
    It's really annoying and I haven't found any way to reproduce the problem consistently (otherwise, I'd file a bug).
    All of my loops are the spoken voice, so it's easy to tell when the first bit of audio is actually from the last bit of speech from the end of the loops.
    This happened on GB '08, both before and after the latest set of patches (circa Sept '07). I'm using a PowerMac G5 dual 2GHz, for what it's worth.

  • Never ending automatic repair loop

    I'm working on a client's HP ENVY TouchSmart 4-1215dx Ultrabook that is stuck in a never-ending automatic repair loop. I have done a system diag...all passed . Tried multiple ways to get into BIOS to do a repair from a USB stick made from another OS 8....but can't get into BIOS to change the boot. Tried F11 to do factoy resest....just puts me back into the loop.  I have a feeling my client downloaded a bad 8.1. Considering pulling the HDD and using my desktop to at least try and save her personal data....Please help!

    Kris_ClearFIxPC wrote:
    I'm working on a client's HP ENVY TouchSmart 4-1215dx Ultrabook that is stuck in a never-ending automatic repair loop. I have done a system diag...all passed . Tried multiple ways to get into BIOS to do a repair from a USB stick made from another OS 8....but can't get into BIOS to change the boot. Tried F11 to do factoy resest....just puts me back into the loop.  I have a feeling my client downloaded a bad 8.1. Considering pulling the HDD and using my desktop to at least try and save her personal data....Please help!
    That would be the best thing to first do and then use the recovery media of which you will now have to order since the O/S seems corrupted beyond repairs. This way you can be sure the recovery media will restore it back to factory install and hopefully they will not do this again til they will consult first before upgrading the O/S.
    I am a Volunteer to help others on here-not a HP employee.
    Replies aren't online 24/7 because of Time Zone differences.
    Remember in this Day and Age of Computing the Internet is Knowledge at your fingertips if you choose understand it. -2015-

  • End a while loop

    For this example:
    int x = 1, y = 2;
    while (x == 1)
    if (y = 2)
    y -= 1;
    if (y = 1)
    y -= 1;
    }Is there a line I can put in the first if statement block to make the loop and and repeat? I'm having a problem with if statements that after one is true, it makes one following it also true. I only want one to be executed, so if I could make the while loop repeat after an if statement is true, I could fix that problem

    I'm having a problem with if statements that after one is true, it makes one following it also true. I only want one to be executedOr perhaps "else if"
    while(foo) {
      if(cond1) {
        cond2 = true;
      } else if(cond2) {
        cond1 = true;
    }

  • How do I increment a variable at the end of a loop to run it through the loop again?

    I'm new to LabVIEW programming and I'm trying to write a small program that just receives a lower and upper limit, and whether the user wants to increment or decrement the number. I can't figure out how to increment the number after the simple calculations have been done and to run through the loop again with the incremented number. Right now I'm using a while loop inside of a case structure where true decrements and false increments.

    Here are a few possibilities.
    Message Edited by altenbach on 12-05-2008 03:25 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    fractionaIncrement.png ‏8 KB

  • Ending an Endless Loop

              while (! source.nextTokenIs('}'))
                   dec = new ClassMemberDeclaration();         
                   dec.compile(source);
              }basically this question is regarding the above loop. This is a while loop that is looking for curly braces (i.e. } ) . But if there are no curly braces of that kind in the file that i am reading then this while loop becomes an endless loop. hence is there any way of timing this method, and after certain time (say 20 seconds the while loop is aborted and a message is displayed saying that the closing curly brace was not found????
    please ignore the body of the method as it was just put there so that you could understand what i was on about.
    please do reply, thank you
    best regards
    alpha

    Endless loop? See this thread: http://forum.java.sun.com/thread.jsp?forum=31&thread=531136&tstart=0&trange=15

  • Real Instruments play beyond end of repeated loop

    I've tried every google-fu trick I could think of to see if anyone else has had this problem.
    I record a real instrument (say an electric guitar riff). I drag/repeat/loop it 3 or 4 times. It plays properly.
    Then at some point I select it, and move it left or right.
    The part starts at the right time, but will repeat an extra time beyond the visible onscreen loop. Once this glitch occurs, neither resaving, shrinking/re-repeating, moving it around and then back to where I want it make the track end when it's supposed to.
    The only way I've found around it, is to end the repeat early and let the erroneous repeat play out, or just end the repeat entirely, and use cut'n'paste instead.
    This happens to me *all the time*... anyone else seen this or have a resolution?

    Thanks for the suggestions. I can't remember deleting any tracks... however, how would i check for "hidden" tracks?
    The funny thing is i can hear the effect returns for the real instrument tracks...tracks that are heavily reverbed i can hear a faint echo of the track. and like i mentioned the drum loop and software piano still play fine.
    And, I also see monitor activity in the real instrument tracks when i play the song. Everything looks normal, but of course, the sound isn't there.
    Thanks again for your help!
    Message was edited by: Ike the Longshoreman
    P.S. I just tried Unsolo all tracks and Unmute all tracks... still the same problem.

  • Error in  END ROUTINE while activating the transformation.

    Hi ALL,
    While writing an END ROUTINE IN BI, I got no error while saving the code.
    But when Activate the Transformation I got the following Error.
    " Syntax Error in GP_ERR_RSTRAN_MASTER_TMPL,row 54(->long text)
    Diagnosis:Component called CRM_OBJ_ID already exits  "
    I have used the above object in the transformation.
    Please help me debug the error or highlight on it.

    Hi,
    i guess u have create two object with  same variable name.check.
    regards,
    rakesh

  • Unable to access end point while invoking web service from bpel

    We are trying to Consume Web Service in our SOA Application and we are getting the following error:-
    "java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: oracle.fabric.common.FabricInvocationException: Unable to access the following endpoint(s): http://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyy.svc ".
    Scenario*:-
    1.The Web Service that we are trying to consume is built on Microsoft Dynamics AX Framework and is using Windows Authentication and we are using Oracle Soa Suite 11g(11.1.1.5) to access it.
    2.The Web Serice is Hosted on IIS server 7.0 . The Soa server and IIS server both are on the same domain(Also need to confirm that is there any need to pass credentials while consuming Web Services when both the servers are on same domain??).
    3.We have tested the Web Service in SOAP UI and is working fine only when we pass the Username,Password and Domain.And if we do not pass the User Credentials then we get the following error:-
    " 401 - Unauthorized: Access is denied due to invalid credentials.
    You do not have permission to view this directory or page using the credentials that you supplied."
    4.We can even access the WSDL from the browser.
    Plz help me out to resolve this issue.Will be really greatfull
    Edited by: 937798 on May 31, 2012 2:36 AM

    910764
    1:- I have not begged or requested for marking all answers as helpful. If answers are helpful then post author can do that.
    2:- I also follow same practice. I dont blindly mark all answers correct or helpful. It can waste other's time. Correct marking is very important. Hence my all question are not having close end.Few are still open for correct answers. I will happily mark them correct if you can help me in that.
    In the end , I will say Kindly refrain yourself using this platform as facebook or other social networking websites.
    I hope you will understand seriousness of this forum and utilize its member's posts at the most.
    Thanks,
    Ashu

  • Inserting a pause at the end of a loop in a film clip...

    Hi,
    I just scanned in 16 frames from old 16 mm film and created a short clip in .swf, by default the clip is looping.
    I want it to loop, but all I want to do is place a 5 second pause at the end of the short 1 second clip before it starts up again.  How would I do that?  Or is there a simple tutorial on this?
    I am using CS4 Flash Professional.
    Thanks.

    OK thanks much,
    So to do that, do i begin by highlighting the last frame (the last frame of the movie itself - actual film image) on the timeline, and go to main menu and select Insert>Timeline>Keyframe?  Then insert stop(); on the last frame via the actionscript panel?
    Then highlight the first frame and insert the setTtimeout() and  play() onto the first frame?
    I inserted the stop() command on the last frame and the clip now stops...
    I tried adding this script on the last frame and clip stops but does not repeat after 5 seconds...
    stop()
    setTimeout(5)
    play();

  • Ending a Thread Loop

    Hello i'm trying to finish this program but the problem is it doesn't end at 100. I'm trying to make the program end when the first animal reach 100 in the position instance, but it continues to finish the thread. How can i end the program when the first thread reaches 100?
    import java.util.Random;
        public class Animal extends Thread implements Runnable{
          private String name;
          private int position;
          private int speed;
          private int restMax;
          public static boolean winner = false;
          Random random = new Random();
           public Animal (String name, int position, int speed,int restMax){
             this.name = name;
             this.position = position;
             this.speed = speed;
             this.restMax = restMax;
           public void run(){
             try{
                while(winner == false){
                   if (position < 100){
                      Thread.sleep(random.nextInt(restMax));
                      position += speed ;
                      System.out.println(name+" is in "+ position+" position ");
                      if (position == 100){
                         winner = true;
                 catch(InterruptedException e){
           public static void main(String[] args){
             Animal rabbit = new Animal("trix", 0, 5, 150);
             Animal turtle = new Animal("maury",0, 3, 10);
             rabbit.start();
             turtle.start();
       }

    try the code below
    import java.util.Random;
    public class Animal extends Thread implements Runnable
         private String name;
         private static int position;
         private int speed;
         private int restMax;
         public static boolean winner = false;
         Random random = new Random();
         public Animal (String name, int position, int speed,int restMax)
              this.name = name;
              this.position = position;
              this.speed = speed;
              this.restMax = restMax;
         public void run()
              try
                   while(winner == false)
                        if ((position+speed) > 99)
                                  winner = true;
                                  System.exit(0);
                        if (position < 100)
                             Thread.sleep(random.nextInt(restMax));
                             position += speed ;
                             System.out.println(name+" is in "+ position+" position ");
              catch(InterruptedException e)
         public static void main(String[] args)
              Animal rabbit = new Animal("trix", 0, 5, 150);
              Animal turtle = new Animal("maury",0, 3, 10);
              Animal ant = new Animal("anto",0, 7, 50);
              rabbit.start();
              turtle.start();
              ant.start();

  • Home, Page, End keys while in Mail

    I have been unsuccessful in getting the four keys above to work while in Mail; I say four keys because there are two Page keys: up and down.
    The keys work while in Safari, but not in Mail.
    I prefer these keys to the up and down arrows on the right side of the viewing panels and to the blue bubble.
    I can get the Page keys to work within the lower Mail viewing window by using the fn key in unison with either Page key. However, it only works in the lower window. If in the upper window, pressing the fn and Page key still moves only the info in the lower window.
    Something is wrong!
    Have I accidentally turned something off?
    I feel that the Home key once worked in the top window, but I don't know how I might have turned it off? The End key works with CTRL while composing e-mail to take me to the end of the line but that's all. Can't remember if it ever went to the bottom of a page?
    These keys on a PC are quite useful; wish they would work on the Apple.
    Shouldn't be that difficult??? Should it?

    Please do not post duplicate copies of the same message.

  • Participant cannot join webinar, receives "webinar has ended message" while the webinar is indeed in session.

    A participant tried to join a webinar while it was still in session via the Event Login Link.  They received a message "webinar has ended" (or something similar) when trying to join with the email address they registered with.  The webinar was still in session, so I'm not sure what was going on??  Anyone else have this issue?

    This happened to one of my users but they were using the wrong link.  Is there any chance they would have had links to two different meetings and mistakenly used the wrong one?

  • Please tell me about the start and end of a loop at main

    part of the table?
    I have put a table into the smartform page and I do not know how to use loop and program lines.
    For what purpose should I use these?
    Any contributions will be rewarded.
    Thanks.Deniz.

    Loop and endloop in smartform - if you want to print multiple data for each header ,then we need to use..
    one example : i have sales order - order may contains more than one item..if you want to print multiple items then we need to go for loop endloop.
    Program lines - without effecting program - we can change the code within smartform( I mean we can pass the values and get the values based on condition )
    i am getting material number from program and i am printing here,later on customer is looking for material description,then you can write simple code within samrtform by using program lines.

  • How do I end an endless loop of Terms and Conditions pages?

    I'm trying to purchase an item from the store and am stuck in an endless loop on the new terms and condition page. I check the box and click agree- and the terms and condition page is reloaded. Please help me spend money on music. Thanks

    I tried going through all 60+ pages of agreement already on my phone, even scrolled all the way through in iTunes. Even tried some of the older fixes from the loops in iOS 5 and before. Anyone else have other ideas? Hopefully before reports of iPads and iPhones being smashed. Lol

Maybe you are looking for

  • All fields with !Format event blank when printing

    A client asked for assistance creating a new shipping label template with Adobe Output Designer 5.5, a program I've not used before. I had no problem creating the layout, and slapping the necessary fields on there (they had a few other templates I wa

  • Performance, how to know what I need most?

    Is there a good way to find out what hardware (or lack thereof) could be causing a bottleneck in performance? I could watch the Activity Monitor while I work, but I don't think that would be as thorough. I have a Macbook Pro 2.4Ghz Core 2 Duo with 4G

  • Where to Notify About 301 Change After Conversion to HTTPS

    Hello, My website has an approved Podcast channel. Recently for security and other reasons, we have changed the whole website to HTTPS (managed Rackspace), 301 redirection is working fine plus I can manually Edit the XML file to reflect the changes (

  • CSS question please

    Please check http://www.pawildsresources.org/ css.  I am trying to change the grey color in the background of the navigation area, to match the cream color #f3f2e8  at the bottom but not locating where to do that.  Also, I want the line right above t

  • What, exactly, is variable bit rate?

    I understand the basic concept of VBR, but how does it actually work? I realize that more bits are devoted to the parts of the movie that have the most action. This means that other parts of the movie are subsampled in some way. Is it spatial subsamp