Turning keyboard interrupts on or off (sys.Interrupts)¶
sys.Interrupts,,i1 |
Determines if keyboard interrupts are enabled |
This field determines whether a program is to abort if it receives the standard keyboard interrupt, or ignore the interrupt.
If sys.Interrupts is OFF, then the program ignores keyboard interrupts.
If sys.Interrupts is ON, and a program receives a keyboard interrupt, then any file update commands are completed and the program then terminates immediately. Because termination is deferred while file updates are taking place, no damage can occur to the data index.
The default for sys.Interrupts is OFF.
NOTES
If a program contains the “on interrupt func_id | gosub label” command, then a keyboard interrupt causes control to pass to the function or subroutine specified. This only happens if sys.Interrupts is ON.
The on interrupt function or subroutine is called if the user presses the task window’s close button. If there is no on interrupt trap, the task window event function is called with the event code EV_CLOSE. If the task window doesn’t have an event function the program terminates. See Window events and event functions.
RELATED TOPICS |