Original Author Paul Laughton, 2011
Page 81
De Re BASIC!
...
<statement>
Repeat
The <statement>s between the While and Repeat will be executed as long as <lexp> evaluates as true.
The <statements>s will not be executed at all if <lexp> starts off false.
While-Repeat loops may be nested to any level. When While-Repeat are nested, any executed Repeat
statement will apply to inner most While loop.
W_R.continue
If this statement is executed within a While-Repeat loop, the rest of the current pass of the loop is
skipped. The Repeat statement executes immediately.
You can exit a While loop without Repeat or W_R.break. As with For-Next loops, this can create subtle
bugs, and BASIC! can help you find them. If debug is on, and your program is still in a While loop when it
ends, BASIC! shows a run-time error: "Program ended with WHILE without REPEAT".
W_R.break
If this statement is executed within a While-Repeat loop, the rest of the current pass of the loop is
skipped and the loop is terminated. The statement immediately following the Repeat will be executed.
Do / Until <lexp>
Do
<statement>
...
<statement>
Until <lexp>
The statements between Do and Until will be executed until <lexp> is true. The <statement>s will always
be executed at least once.
Do-Until loops may be nested to any level. Any encountered Until statement will apply to the last
executed DO statement.
You can exit a Do loop without Until or D_U.break. As with For-Next loops, this can create subtle bugs,
and BASIC! can help you find them. If debug is on, and your program is still in a Do loop when it ends,
BASIC! shows a run-time error: "Program ended with DO without UNTIL".
D_U.continue
If this statement is executed within a Do-Until loop, the rest of the current pass of the loop is skipped.
The Until statement executes immediately.