BREAK

Syntax

BREAK()

Description

The BREAK function causes an immediate break out of the current loop.

Example

SET(&Value, 1);
WHILE(&Value < THE_ABSOLUTE_MAXIMUM,
	SET(&Value, &Value * 2);
	IF(&Value = ENOUGH_ALREADY, BREAK());
	INC(&Value)
);
IF(&Value > ENOUGH_ALREADY, "More than enough", "Just right")

You normally use the BREAK function within an IF function to break out of a loop when a specified condition is achieved. To return Just right from the formula, ENOUGH_ALREADY must contain a value from the sequence 2, 6, 14, 30, and so on.