[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
ON TIMER Trap for Elapsed Time
ON TIMER(n) GOSUB {linenum | linelabel}
Establishes a subroutine to which Turbo Basic will branch if a
specified number of seconds have passed. The trap must also be turned
on by means of a TIMER ON statement.
n A numeric expression in the range 1 to 86,400 (1 second to
24 hours).
linenum The first line of a timer-handling subroutine. Setting
linenum to 0 disables trapping.
linelabel A label identifying the first line of a timer-handling
routine.
--------------------------------------------------------------------------
Notes: With trapping in effect, Turbo Basic checks to see if the
specified number of seconds have elapsed. When the
specified amount of time has passed, Turbo Basic branches
to the specified subroutine and temporarily suspends
trapping (by means of an implicit TIMER STOP statement).
Trapping automatically resumes when a RETURN from the
handling subroutine is executed (unless the handler
explicitly performs a TIMER OFF or TIMER STOP).
With event trapping in effect, Turbo Basic checks for the
specified event after each program statement. The $EVENT
metastatement can be used to turn event trapping on and
off at specified points within a program.
See Also:
$EVENT
TIMER (Statement)
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson