The $BREAK statement

Syntax:

$BREAK

It is not always useful to exit a loop with the abort criterion. The keyword $BREAK can also abruptly terminate the execution of a loop in addition to program execution with single $CASE labels of the $SWITCH statement (see section Switch branching).

For example, this is useful with extremely nested loops if execution of the innermost loop should be interrupted.

Programing Example

prg_example

The $BREAK statement

N10 $WHILE <expr1>        The loop is terminated if

N20 ...                   expr1 is "not valid” or

N30                       expr2 is "valid”.

N40 $IF <expr2>

N50 $BREAK

N60 $ENDIF

N70 ...

N80

N90 $ENDWHILE

N100 ...