BREAK


The BREAK statement allows the break key to be configured.

 

COMMAND SYNTAX

BREAK
BREAK ON
BREAK OFF
BREAK expression

 

SYNTAX ELEMENTS

When used with an expression, or the keywords ON or OFF the BREAK statement enables or disables the BREAK key for the current process. In UNIX terms the BREAK key is more commonly known as the interrupt sequence intr defined by the stty command.

Used as a standalone statement, BREAK will terminate the currently executing loop. The EXIT statement is functionally equivalent to the BREAK statement used without arguments.

 

NOTES

As BREAK is used to terminate the innermost loop, it is ignored if used outside a loop construct. The compiler will issue warning message 44, and ignore the statement.

 

EXAMPLE

LOOP
    READNEXT KEY FROM LIST1 ELSE BREAK
    ......
REPEAT
* Program resumes here after BREAK


jBC