[RESOLVED] Continue Keyword In a Double Nested For Loop
I need to continue an itineration in a double nested loop, but I need the continue statement to progress the OUTER loop even though it is in the INNER loop:
Here's a very basic example:
Code:
for x=0 to 200
for y=0 to 100
if y=10 then continue 'I want to continue the next x loop not the y loop
next
next
I thought specifying the loop variable would do the trick (continue x) but I'm getting a syntax error.
Any way to do this in VB.Net?
Thanx!
Re: Continue Keyword In a Double Nested For Loop
will this help ?
Code:
for x=0 to 200
for y=0 to 100
if y=10 then
Exit For
End if
next
next
or simply use another function and pass value of x and y to continue with whatever operation you want to perform.
Re: Continue Keyword In a Double Nested For Loop
That was helpful; thanks!