WHILE

Syntax

WHILE test list run list

Explanation

WHILE evaluates its first input and runs the Logo command(s) in its second input if the value of the first input is TRUE. WHILE will continue this process until the value of the first input is FALSE.

See also FOR, IF, IFTRUE, and IFFALSE.

Example

? MAKE "X 1

? WHILE [:X < 5] [PRINT :X MAKE "X :X+1]

1

2

3

4

?