lang • while

WHILE

WHILE Expression ... WEND

Begin a loop structure delimited by WHILE ... WEND instructions.

The loop is repeated while Expression is true.

If the expression is false, the loop is never executed at all.

The DO WHILE ... LOOP structure is an equivalent.

Example

Dim a As Integer

a = 1

While a <= 10
  Print "Hello World"; a
  Inc a
Wend

See also