Identifier: on_interrupt { }

Type

callback

Description

The keyboard interrupt procedure which is executed when the keyboard interrupt character (Ctrl-Break on Windows, Ctrl-C on Unix) is typed. The procedure is executed in-line, so any change of program flow (e.g. return, break etc.) will be executed relative to the command frame where the interrupt occurred.

This procedure does not require any parameters.

The on_interrupt procedure is a transient identifier and is valid only within the command frame where it was assigned. Consequently, in other command frames (e.g. other macros, functions and procedures) the procedure is undefined (null) unless explicitly set therein.

If no procedure has been defined for a command frame, a keyboard interrupt is ignored but the system numeric interrupted is set to 1 to indicate to the language, and to parent command frames, that the user has forced an interrupt.

By default, the value of interrupted is set to 0 within the on_interrupt procedure, but may be set by the user if required by the parent command frame.

See Also

Identifiers:

interrupted(numeric)