Do … Loop
Top  Previous  Next

Do [While Until condition]
[statements]
Loop 

Or, you can use this syntax:

Do

[statements]
Loop [While Until condition


Repeats a block of statements while a condition is TRUE or until a condition becomes TRUE.

Parameters
 
condition  
 
Expression that evaluates to TRUE or FALSE.  
 
statements  
 
One or more statements executed while or until condition is TRUE.  

Remarks

If condition is TRUE, all statements in statements are executed until the Wend statement is encountered. Control then returns to the While statement and condition is again checked. If condition is still TRUE, the process is repeated. If it is not TRUE, execution resumes with the statement following the Wend statement.  
Unlike For, While evaluates condition on every loop pass.  

Example

 
do  
      input "do you want to continue ? ", a  
loop while a = "y" or a = "Y"