WHILE
Runs a block again and again, while a condition is true.
Syntax
WHILE condition BEGIN … END
| Argument | Meaning |
|---|---|
| condition | An expression that is TRUE or FALSE (or a number: 0 is false), worked out before each time round. |
DO may go before BEGIN.
Examples
X0 = 10
WIDTH = 10
WHILE X0 + WIDTH <= L BEGIN
P10 = [X0, 0] ; P11 = [X0 + WIDTH, 0]
LINE P10, P11
X0 = X0 + WIDTH * 2
WIDTH = WIDTH * 1.5
END

Dashes, each half as long again as the one before, as many as fit along the box.
Notes
A loop that never ends stops after a million statements, with the reason shown. BREAK leaves the loop; CONTINUE
goes on to the next time round.
See also: Blocks and control flow, FOR.