Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
TIMER Statement Details
◄Summary► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
TIMER {ON | OFF | STOP}
Usage Notes
■ If your program contains event-handling statements and you are compiling
from the BC command line, use the /W or /V option. If you do not use
these options and your program contains event traps, Visual Basic
generates the error message, "ON event without /V or /W on command
line." See: ◄BC Command-Line Options►
■ TIMER ON enables timer-event trapping. A timer event occurs when n&
seconds have elapsed (as specified in the ON TIMER statement). If a
timer event occurs after a TIMER ON statement, the routine specified
in the ON TIMER statement is executed.
■ TIMER OFF disables timer-event trapping. No timer-event trapping
takes place until another TIMER ON statement is executed. Events
occurring while trapping is off are ignored.
■ TIMER STOP suspends timer-event trapping. No trapping takes place
until another TIMER ON statement is executed. Any ON TIMER events
that occur while trapping is suspended are remembered and processed
when the next TIMER ON statement is executed. However, remembered
events are lost if TIMER OFF is executed.
■ When a timer-event trap occurs (that is, the GOSUB is performed), an
automatic TIMER STOP is executed so that recursive traps cannot take
place. The RETURN from a trapping routine automatically performs a
TIMER ON statement unless an explicit TIMER OFF was performed inside
the routine.