Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do While Question

Status
Not open for further replies.

pzepernick

Programmer
Feb 16, 2004
13
0
0
US
Does anyone know if it is possible to go back up to the top of the Do While without making it all the way through the loop. Example

Do While True
If True
Go back to top of while
End If

Other code here
Loop




Thanks,

Paul
 
There isn't a "Next While" or anything like that. What exactly are you looking to do (ie. show some code)

----
a5k
 
Paul,

Couldn't you just have code like this:

Do While True
If False
Other code here
Else
Go back to top of while
End If
Loop

Pete
 
That is what I am trying to figure out. What is the command to make it go back to the top of the While? I am used to working with Java where I can issue a continue; anywhere inside the loop and it will go back to the top.

Thanks,

Paul
 
Paul,

I believe you can do something like:

Do While True
TopOfLoop:
If True
goto TopOfLoop
End If

Other code here
Loop

Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top