FutureBasic Logo

<<    Index    >> FutureBasic

exit [structure]   statement

exit case
exit do
exit for
exit next
exit until
exit wend
exit while

When used inside a for/next loop, while/wend conditional, do/until conditional, or in a select case structure, this statement causes the program to jump immediately to the line following the next, wend, until, or end select statement. This is useful when, you wish to break out of a loop because a certain condition has been met. exit is a safe way to do it.


for x = 1 to 10
  if x == 5 then exit for
next x

See also
for; while; do; select case; break; continue