Continue [(<level>)] |
The Continue
statement can be used to jump to the end of a loop structure.
An example:
While i < 100 i = i + 1 If i > 50 Then Continue j = j + 1 Wend |
The code above counts i
from 0 to 100. The variable j
is also incremented each
loop but only while i
is less than or equal to 50. If i
is greater than 50
j
will not be incremented any more. At the end of the loop i
has the value of
100 and j
has the value of 50.
Using the optional argument level
you can also jump to the end of higher
loops. If you do not specify level
Hollywood will assume 1 for it which
means that it will jump to the end of the nearest loop. If you use higher
values for level
Hollywood will traverse the loops upwards.
Please note: If you specify the optional argument level
it is obligatory
to put parentheses around it.