Registers/cancels an interrupt processing routine. An interrupt routine is called when the specified condition statement is met. Conditional specification methods are the same as IF.
ONCALL:val1:op:val2:label[:resume type:resume label]
The ONCALL statement syntax has the following parts:
In 2 - 5, above, all previous ONCALL registrations after the corresponding ONCALL are deleted. In the case of 3 and 5, however, ONCALL commands registered at the same level as the return position are preserved.
// Rest of program
PRINT:"50% Battery Power Remaining (or less)"
Once the interrupt is registered, the conditional is evaluated after each subsequent line in the program executes. Nested interrupts are not allowed and are ignored. ONCALL is affected by the subroutine's nesting. An ONCALL registered in a subroutine becomes invalid when execution leaves that subroutine.