BREAK

BREAK

Top  Previous  Next

 

The BREAK command controls the action taken on use of the break key. It can be used, for example, the suppress quits during critical parts of an application.

 

 

Format

 

BREAK OFFTo increment the break inhibit counter

 

BREAK ONTo decrement the break inhibit counter

 

BREAK RESETTo enable breaks by resetting the break inhibit counter to zero

 

BREAK CLEARTo cancel deferred breaks

 

BREAK COUNTTo report the value of the break inhibit counter (the number of active BREAK OFF commands)

 

BREAK ON USER nTo enable the break key for the specified user

 

 

QM maintains a count of the number of times that breaks are disabled. Each BREAK OFF command increments this count. The BREAK ON command decrements the count unless it is already zero. The BREAK RESET command sets the counter to zero.

 

The BREAK COUNT command reports the current value of the break inhibit counter.

 

If the break key is pressed whilst breaks are suppressed, the break is deferred until the count returns to zero by a subsequent use of BREAK ON. The normal action prompt will then appear. The BREAK CLEAR statement cancels any deferred break event.

 

For all of the above forms, @SYSTEM.RETURN.CODE is returned as the current value of the break inhibit counter unless an error occurs, in which case it is set to a negative error code.

 

The final form, BREAK ON USER n, is only available to users registered as administrators and enables the break key for the specified user. @SYSTEM.RETURN.CODE is returned as zero unless an error occurs, in which case it is set to a negative error code.

 

 

See also:

BREAK (QMBasic), SET.BREAK.HANDLER, REMOVE.BREAK.HANDLER