BREAK |
![]() ![]() ![]() |
The BREAK statement allows the action of the break key to be disabled during program execution.
Format
BREAK {KEY} OFF BREAK {KEY} ON BREAK {KEY} CLEAR BREAK {KEY} expr
where
QM maintains a break inhibit counter which is set to zero before the command prompt is first displayed. This counter is incremented by the BREAK OFF statement and decremented by BREAK ON though it cannot become negative. Use of the break key whilst the counter is non-zero will not cause a break action to occur. Instead, the break is remembered and will be handled when the counter returns to zero. Multiple use of the break key will not result in more than one break event being handled. The BREAK CLEAR statement cancels any deferred break event.
The BREAK expr format of this statement is equivalent to BREAK OFF if the value of expr is zero, BREAK ON if expr is positive and BREAK CLEAR if expr is negative.
Example
BREAK OFF GOSUB UPDATE.FILES BREAK ON
This program fragment inhibits use of the break key while the internal subroutine UPDATE.FILES is executed. |