Home > Language Reference > Program Flow Functions > While

While

The While...Wend statement loops through a block of steps while the specified condition is True. 

Usage

Used to to repeat the same steps.

Syntax

While <boolean_expression>
     <statements>
    Wend

Parameters

<boolean_expression>, boolean. The result of the expression must be True or False.
<statements> are executed while the expression is True.

See also

Logical Operators
Repeat...Until

Example

a = 0
While a < 5
        beep (100)
        a = a + 1
Wend