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

= 1

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

See also