REPEAT .. UNTIL Verbs
Syntax
REPEAT
…
UNTIL expr
Description
The REPEAT and UNTIL verbs form a program loop. For example:
LOOP_EXIT=0
REPEAT
GOSUB 1000
UNTIL LOOP_EXIT=1
The loop continuously executes the subroutine at line 1000 until the
numeric variable LOOP_EXIT is nonzero. The expr
on the UNTIL verb must be numeric, and the loop executes until the value
evaluates as true. As with all PRO/5 looping capabilities, the REPEAT/UNTIL
may be nested.
NOTE: To exit the REPEAT loop early,
the EXITTO verb must be used, or an error results.
PRO/5 also supports the looping constructs FOR .. NEXT and WHILE .. WEND.
See FOR .. NEXT and WHILE
.. WEND for additional information.