exit Statement

The exit statement forces an early exit from a loop that is under for...next or loop...repeat control.

Syntax

exit

Description

The program continues with the next executable statement after the next or repeat statement.

NOTE

If the exit is not embedded in a loop...repeat or for...next construct, it is ignored.

Example(s)

loop

input guess

if guess=’end’ then exit

while guess > 1 and guess < 100 do repeat

See Also

for...next Statement

loop Statement

next Statement

Statements and Functions