|
-
Aug 27th, 2008, 06:41 PM
#1
Thread Starter
Hyperactive Member
[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!
Last edited by neef; Aug 28th, 2008 at 06:20 PM.
Intermediate Level Programmer Extraordinaire 
-
Aug 27th, 2008, 06:51 PM
#2
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.
__________________
Rate the posts that helped you 
-
Aug 28th, 2008, 06:20 PM
#3
Thread Starter
Hyperactive Member
Re: Continue Keyword In a Double Nested For Loop
That was helpful; thanks!
Intermediate Level Programmer Extraordinaire 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|