Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Is there a break statement in VB?

  • 28-03-2003 04:49PM
    #1
    Registered Users, Registered Users 2 Posts: 1,722 ✭✭✭


    Is there any break statement in VB that if you execute will take you to the line directly after the last line of the loop? Like the break statement in C++?

    I was thinking of using GOTO but if I can't get away with not using that I rather not.


Comments

  • Registered Users, Registered Users 2 Posts: 437 ✭✭Spunj


    do..while
    exit do

    for...next
    exit for

    that kinda thing?


  • Registered Users, Registered Users 2 Posts: 1,722 ✭✭✭Thorbar


    Great that's what I was looking for. Will that work if I put in inside an if statement which is within a loop?


  • Registered Users, Registered Users 2 Posts: 15,443 ✭✭✭✭bonkey


    How hard can it be to code that and see ;) You coulda done that in the same length of time it took teh write the post :)

    Seriously though....it will work.....assuming what you want is "break if this statement is true" behaviour?

    jc


Advertisement