Mirage Source
"Continue" For Loop? - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: "Continue" For Loop? (/showthread.php?tid=652)



"Continue" For Loop? - Obsidian - 16-01-2007

Yeah i know i know this... but i cannot think at all right now. When you're inside a for loop, and you stumble across a certain event... and you want it to ignore your current variable, and start at the next one... what is the VB code for it? I know in C++ it's 'continue'... but i can't for the life of me think of what the VB6 equivalent is...


- Spodi - 17-01-2007

A big fat IF statement or GoTo is all I can think of.

Code:
For I = 1 to 100
If I  37 Then
DoStuff
End If
Next I

Code:
For I = 1 to 100
If I = 37 Then GoTo NextI
DoStuff
NextI:
Next I