How do I return to the top of a while loop?

I have a while loop running through a file. If some criteria in the line produces and error I'd like to return to the top of the loop and process the next line. I'd rather not nest everything in if's because it tends to make code 'downstream' very indented, messy, and hard to maintain.
For example, in Perl I have the 'next' and 'last' statements which immediately return to the top of the loop and the end of the loop, respectively.

The break statement in Java is similar to last in Perl.
The continue statement in Java is similar to next in Perl.

Similar Messages

  • How do I return to the top of a form when input validation fails?

    I have a form that I am using spry input validation that I
    would like the user to be returned to the top of the page when
    validation fails. If that can't be done somewhat easily, can I have
    a message appear next to the submit button that says "Errors found.
    The field(s) marked in red need to be corrected" when there are any
    errors that prevent the form from submitting.

    The break statement in Java is similar to last in Perl.
    The continue statement in Java is similar to next in Perl.

  • How can I return to the top of an array indicator

    I have in my UI a 1D array indicator that I will navigate to and populate with different lists of items depending on other selections.  Always text elements.
    I have limited the number of visible rows to 20 max even though some lists will contain dozens if not hundreds of elements while others may have less than 10.  Problem is, if I scroll down the list for one population, then come back and the next list happens to have only 10 elements, the scroll bar is still way down where I had scrolled to earlier.  It is basically showing unpopulated positions in the array. (Not blank list items)
    How can I return the scroll position back up to the first element in the array when I populate it with a new list?  I looked through every property node and could find nothing.  Seems like there should be a method to refresh the display or it should go back to the top when you write a new value to it.
    Any thoughts?
    Thanks
    Doug
    "My only wish is that I am capable of learning each and every day until my last breath."

    Index Values, I think, is the property you are looking for.  Set the index to 0 to be at the top.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How can I sync ONLY the top photo in the stack?

    I sync various Aperture photo albums to my IPad and iPhone. The problem is that when I have 'stacked' images (eg. one image showing in the album and two other copies 'hidden' underneath), all of the photos in the stack are copied to the ipad and iPhone. So instead of seeing just one version of an image, I see as many as are in the stack. How can I sync ONLY the top photo in the stack?
    Thanks for your help!

    I solved my own problem.
    The sync problem seemed to only occur on smart albums. There is a new check box option in Aperture 3 when making a smart album: "sync stack pick only." One click and the problem is solved!

  • I just updated iOS on my iPhone 5. What a shock!! Where is the premium look and feel I bought my iPhone for? If I wanted the lokale feel of iOS 7.0 I would have bought a much cheeper taiwanese smartphone. Please let me know how I can return to the origina

    I just updated iOS on my iPhone 5.
    What a shock!! Where is the premium look and feel I bought my iPhone for?
    If I wanted the lokale feel of iOS 7.0 I would have bought a much cheeper taiwanese smartphone.
    Please let me know how I can return to the original look and feel of the iPhone surface I bought my phone for.

    You had plenty of time to look at screenshots on the internet and read various blog posts about iOS 7.

  • How can I return to the same position in the calling order details form

    I am Calling a form for creating a new item from order details form, so after creating The new item I want to returned the item code to the calling form to same position in The order details form , how can I return to the same position in the order details form
    Waiting for your valuable answer .
    Best regards
    Jamil Alshaibani

    Dear Friends
    My actual problem description as the following
    I have a form for production order screen , and this form contain header and details blocks , so the user in the details will select Type Code , and he will go the next field that is Item Code Field search for specific Item Code if it is not exist he has to call the Item Definition Form by using this script
    CALL_FORM(ITEM_DEFINITION);
    Then when he finished defining the Item , and I assign the item code as the following in the :
    WHEN-BUTTON-PRESSED TRIGGER
    :GLOBAL.ITEM_CODE_VAR := :ITEM_CODE;
    DO_KEY('exit_form');
    But I don't know where to keep this assignment
    :ITEM_CODE := :GLOBAL.ITEM_CODE_VAR;
    inside the caller form in which trigger do I have to use when it return from the caller form it should assign the :GLOBAL.ITEM_CODE_VAR to the :ITEM_CODE and the cursor it should show inside the ITEM_CODE , and as I mention it does not return to the same location of The ITEM_CODE when it return from the calling form
    Waiting for your valuable answer .
    With example please .
    Best Regards
    Jamil Alshaibani

  • How can I return to the Classic address book 3 pane view?

    How can I return to the Classic address book 3 pane view  & get rid of the stupid fake leather and same for iCal?

    I asked the same question at the Apple Genius Bar a week or so ago and they said there was no way to change it.  I am with you - do not like this new format at all and would love it if Apple would offer both -maybe when they do an "fix" next?  This was one change in Lion that should not have been made from Snow Leopard.  I am really sorry I upgraded at this point.

  • I downloaded the newest version of firefox today 8/16/11 and now I cannot use Evernote (nor does clipmarks work from before) this is unacceptable. How do I return to the earlier version of firefox? Thank You, Carol Roberts

    I downloaded the newest version of firefox today 8/16/11 and now I cannot use Evernote (nor does clipmarks work from before) this is unacceptable. How do I return to the earlier version of firefox? If there is no way to do this, then I will have to use internet explorer so I hope you can help me with this. Thank You, Carol Roberts

    Until Evernote updates their add-on to mark it compatible with Firefox 6, you can use the [https://addons.mozilla.org/en-US/firefox/addon/add-on-compatibility-reporter/ Add-on Compatibility Reporter] to try re-enabling it yourself.
    You can also downgrade to a previous version of Firefox from [https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/ this archive], but please be warned that some old versions of Firefox have known security bugs that are fixed in later versions. See also: [[Installing a previous version of Firefox]]

  • How can I return to the previous screen in safari?  the arrow is often grayed out.

    how can I return to the previous screen in safari?  the arrow is often grayed out.

    Try a 2 finger swipe left or right to change screens. If that doesn't work go to System Preferences/Trackpad/More Gestures and set it up.

  • How can I return to the previous browsing page in the App store?

    How can I return to the previous browsing page in the App store?

    Thanks for your reply but problem not solved. If I have reached page 5 for example, I can not go back to the previous page 4. Instead it goes back to page 1 when I use the back track arrows, gestures or the back or forward commands!! The girl at my local Apple dealer says that it can't be done. This should be a very basic browsing function in the App Store. I know other people have the same problem.

  • How can I return to the a previous version of itunes?

    How can I return to the a previous version of itunes?

    The only way to return is to remove Lion and reinstall Snow Leopard.

  • How to give colors to the top-of-page in ALV Grid

    How to give colors to the top-of-page in ALV Grid
    in table GT_LIST_TOP_OF_PAGE i am filling 3 rows ,i need 3 different colors to be displyed on top-of-page(one color to one row)
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    I_LOGO = 'ENJOYSAP_LOGO'
    IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
    please help mee

    HI Kranthi,
    Check out teh foll. link,
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    Hope this helps.

  • When I click the launchpad, (I have icons on 2 pages) how do I return to the 1st set when the system seems to automatically shift to 2nd page?

    When I click the launchpad, (I have icons on 2 pages) how do I return to the 1st set after the system seems to automatically shift to 2nd page?.
    I'm not aware of anything I might have done, but it's annoying to want to use an icon on the 1st page, only to see all the icons on page 1 shift rapidly to the left
    and I can't find a way to shift back to page 1.
    Is there a way of getting all my Launchpad icons onto 1 page by adjusting their size?

    Thanks for that. I think the 2 little white dots were hidden by the white frame round the desktop picture on my screen
    As you can see from the pic, there is a broad white frame around the image.

  • How to give colors to the top-of-page in ALV List Display

    how to give colors to the top-of-page in ALV List Display....

    Check this blog.........
    It provides your required output...........
    /people/vijaybabu.dudla/blog/2006/07/21/topofpage-in-alv-using-clguialvgrid
    See the point 7 for complete code...
    Regards,
    Pavan

  • I went to the Canadian App Store, how do I return to the us store?

    I went to the Canadian App Store, how do I return to the us store?

    How to change the store location
    http://www.ehow.com/how_8202183_change-app-store-account-location.html

Maybe you are looking for

  • Passing variables in an array to jtextarea?

    What method could I use to pass different Strings in an array to a jtextarea each time the "Next" button (a JButton) in my JFrame is pressed? So, for example, if i hit next, i might want the word "frank" to print in the jtextarea, but the next time i

  • VISA Set I/O Buffer Size fails with all but one value on Linux RT

    I was unable to initialize a serial port on a cRIO-9030 using a code that works fine on VxWorks and Windows, when I tracked it down to this somewhat strange behaviour; If you call VISA Set I/O Buffer Size on Linux RT (at least on the 9030 device) you

  • How to Zoom in to show typeing and etc on screen recording

    so after watching some screen recordings of mine, on youtube. I can't see the URL's i was typeing. I have seen other video where people zoom in on a small area so you can see what people are typeing or to zoom in on the arrow and follow it around as

  • Internet stopped working after update

    i have had my blackberry for about 4 months, i am on a sim only contract which has blackberry internet, this morning i installed the blackberry desktop manager so i could update my blackberry from version 4.6 to 5.0, wouldnt let me do it from my blac

  • How to find vendor who does not have transactions for last one year

    HI all, We have around 20000 vendors, i want to find out who does not have any transactions for last 1 year.  Any valuable suggestions on this? Thanks and regards Ramarao