r/visualbasic • • May 05 '24

GoTo?

As I've been going through my studies I saw that GoTo still exists in VB. Could someone provide a real life use case for it? The one in the book could have been handled by a simple If Else statement.

1 Upvotes

15 comments sorted by

View all comments

Show parent comment

1

u/[deleted] May 06 '24

[removed] — view removed comment

3

u/BCProgramming May 06 '24

Not sure I understand what you mean. Loop conditions are only evaluated once per iteration of the loop. Changing the condition of an outer loop doesn't have any effect on control flow until the next time it is evaluated, which means if you change it in an inner loop, that inner loop will still run to it's completion first.