HTBasic Help
×
Menu
Index

ON SIGNAL

Defines an event branch for SIGNAL statement.
 
 ON SIGNAL signal-number [,priority] action
 
Usage:
ON SIGNAL Selector,Priority CALL Sub2
ON SIGNAL RECOVER Trap
ON SIGNAL 8 GOTO 770
 
Example:           ON SIGNAL.BAS
 
Description:
ON SIGNAL enables an event branch which occurs when a SIGNAL statement is executed using the same signal-number. The signal-number is a numeric expression rounded to an integer with a range of zero through fifteen.
 
Executing ON SIGNAL while another ON SIGNAL is still in effect for that same signal number overrides the previous ON SIGNAL definition. If the ON SIGNAL is executed in a different program context the original ON SIGNAL definition is restored when control returns to the calling context.
ON SIGNAL is canceled by OFF SIGNAL and disabled by DISABLE. A SUBEXIT, SUBEND, or RETURN from the defining subprogram also cancels it.
 
More information about ON SIGNAL can be found under the "Common Information" heading of the ON CYCLE manual entry.
 
See Also: