08-24-2022, 05:40 AM
Hi all. First post. I did post a couple of times on Facebook, but now I'm here.
Okay... I have a FOR/NEXT loop that I want to exit if a certain condition occurs. The thing is, if I put a label for it to go to it doesn't do that. It simply resumes on the next line after the loop. I'm using version 2.02
Okay... I have a FOR/NEXT loop that I want to exit if a certain condition occurs. The thing is, if I put a label for it to go to it doesn't do that. It simply resumes on the next line after the loop. I'm using version 2.02
Code: (Select All)
Cls
For x& = 1 To 10
Print x&
If x& = 5 Then Exit For: GoTo stuff
Next x&
Print "done"
here: GoTo here
stuff:
Print "exited loop"