while

Begins a loop construct.

Syntax

while(expr)

Input

expr
A mathematical expression. If expr evaluates to zero, the expression is false, the loop terminates and the instruction following endloop is executed. If expr evaluates to any other value, the expression is true and the instructions between while and endloop are executed.

Example

Template:
{
 i = 0;
 while(i < 5);
 i; cr();
 i++
 endloop
}
Output:
0
1
2
3
4

Comments

Every while loop must be terminated with an endloop statement.