Loop Statement

Executes several statements in an endless loop.

Syntax

Loop

[ statements ]

Endloop

Comments

The statements are executed repeatedly until the control is transferred outside the Loop statement. Usually the Exitloop is used to terminate the loop and to transfer control to the next statement.

Example

i=0

Loop

i+i+1

If i =3 Then

i =4

continue

Elseif i=6

Exitloop

Endif

Print i;

Endloop

! This will print 1 2 5

See Also

Continue, Exitloop, For, Repeat, While