DEFER INTERRUPT / QUIT
The DEFER
instruction defines the program
behavior when interruption or quit signals are received.
Syntax
DEFER { INTERRUPT | QUIT }
Usage
The DEFER
instruction
controls the behavior of the program when an interruption or quit signal
has been received.
DEFER INTERRUPT
and DEFER QUIT
instructions should only be
used in the MAIN
block, to be executed
at the beginning of the program.
DEFER INTERRUPT
indicates that the program must
continue when it receives an interrupt signal. By default,
the program stops when it receives an interrupt signal.
Once deferred, you cannot reset to the default behavior.
When an interrupt signal is caught by the runtime system and DEFER
INTERRUPT
is used, the INT_FLAG
global variable is set to true by the runtime system.
Interrupt signals are raised on terminal consoles when the user presses a key like CTRL-C, depending on the stty configuration. When a program is displayed through a front-end, no terminal console is used; therefore, users cannot send interrupt signals with the CTRL-C key. To send an interruption request from the front-end, you must define an 'interrupt' action view.
DEFER QUIT
indicates
that the program must continue when it receives a quit signal.
By default, the program stops when it receives a quit signal.
When a quit signal is caught by the runtime system and DEFER
QUIT
is used, the QUIT_FLAG
global variable
is set to true by the runtime system.