Continue

The Continue statement in a While or For loop causes a transfer of control back to the beginning of the loop so that the controlling expressions can be re-evaluated. In a Switch or Select statement, execution of a particular case is terminated and a search for the next matching case is initiated.

Syntax:

Continue

Parameters:

none

 

In While or For statements, use the Continue statement to immediately stop execution and re-evaluate the While or For statement to determine if the loop should be repeated. In For statements, the index variable is also incremented. In Switch or Select statements, if a case is being executed, execution of that case is terminated, and a search is started for another case statement whose expression evaluates to the same integer as the expression controlling the Switch or Select statement.

 

Example:


a=0
b=0
While (a<100)
   a=a+1
   If a>10 Then Continue
   b=b+1
EndWhile
Message("Continue","Continued")
See Also:

Break, For, While, Switch, Select