Exitloop Statement

Terminates the smallest enclosing For, Loop, Repeat, or While statement in which it appears.

Syntax

Exitloop

Example

i=0

Loop

! Program statements

if i > 5 then

exitloop

endif

print i,

i=i+1

Endloop

! this will print 0 1 2 3 4 5

See Also

For, Loop, Repeat, While