INT_FLAG

INT_FLAG is a predefined variable set to TRUE when an interruption event is detected.

Syntax

INT_FLAG

Usage

INT_FLAG is set to TRUE by the runtime system when an interruption event is detected by the runtime system. The interruption event is raised when the user presses the interruption key, or when the graphical front-end sends an interruption event while the program is running in a procedure or SQL query.

INT_FLAG must be used with the DEFER INTERRUPT configuration instruction. If the DEFER INTERRUPT instruction is not specified, and interruption signal will stop the program execution.

When an interruption event occurs during a procedural instruction (FOR loop), the runtime system sets INT_FLAG to TRUE. It is up to the program to check the INT_FLAG variable.

When an interruption event occurs during an interactive instruction (INPUT, CONSTRUCT), the runtime system sets INT_FLAG to TRUE and exits from the interactive instruction. It is recommended that you test INT_FLAG after an interactive instruction to check whether the input has been canceled.

Once INT_FLAG is set to TRUE, it must be reset to FALSE in order to detect a new interruption event.

INT_FLAG will also be used by the runtime system as diagnostic flag for predefined action block execution such as ON INSERT in DISPLAY ARRAY.

Example

MAIN
  DEFER INTERRUPT
  LET INT_FLAG = FALSE
  INPUT BY NAME ...
     AFTER INPUT
        IF INT_FLAG THEN
           MESSAGE "The input is canceled."
        END IF
     ...
  END INPUT
  ...
END MAIN