-
March 25th, 2004, 10:18 AM
#1
[VB] Continue statement on FOR loop
I can not find anywhere the definition of a continue for a VB FOR loop
for i = 0 to 10
if i = 2
continue
else
'do some other stuff
end if
next i
I have tried
-
March 25th, 2004, 10:23 AM
#2
You don't need anything like that. your loop will continue without any statement there. The following 2 loops will do what you want.
for i = 0 to 10
if i = 2
else
'do some other stuff
end if
next i
for i = 0 to 10
if i <> 2
'do some other stuff
end if
next i
-
March 25th, 2004, 10:26 AM
#3
VB does not have contrinue
this can be an alternative :
Code:
For n=1 to 100
'do some code
if ... then goto Continue:
'do some code
'do some code
Continue:
Next
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
|