"While" loop

while condition [instructions]

Repeat instructions from the list while condition is met. If condition is false before loop is started then instructions are never executed.

Example:

make "x 5
while :x > 1 [
  print :x
  make "x :x - 1
]

Output:

5
4
3
2

See also:

Loop statements

Table of Content