next | previous | forward | backward | up | top | index | toc | home

break -- break from a loop

Synopsis

Description

Omitting x, and executing break, interrupts execution of a loop as above, returning null as the value of the function currently being evaluated, except, in the case of a for loop or a while loop with a list clause, the list accumulated so far is returned as the value.

Caveat

Warning: trying to break from a loop controlled by table will probably not do what you expect, since table is implemented by two nested loops controlled by apply, and only the inner one will stop.

See also

For the programmer

The object break is a keyword.