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.
ON TIMER Statement Details
◄Summary► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
ON TIMER(n&) GOSUB {linenumber | linelabel}
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►
■ The RETURN linenumber or RETURN linelabel forms of RETURN can be used to
return to a specific line from a trapping routine. However, any GOSUB,
WHILE, or FOR statements active at the time of the trap remain active.
Visual Basic may generate error messages such as "NEXT without FOR."
■ If an event occurs in a procedure, a RETURN linenumber or RETURN
linelabel statement cannot get back into the procedure, because the
line number or label must be in the module-level code.
■ The ON TIMER statement specifies only the start of an event-trapping
routine. The TIMER statement determines whether the routine is called
and how events are handled when trapping is off. See: ◄TIMER Statement►