Jump to navigation Jump to search
Revision as of 22:19, 19 September 2010 by
A TIMER statement enables, turns off or stops timer event trapping. Qbasic only uses one timer, but QB64 can have many.
Syntax 1: TIMER ON
Syntax 2: TIMER OFF
Syntax 3: TIMER STOP
- TIMER ON enables timer event trapping by an ON TIMER (n) statement. While trapping is enabled, a check is made after every code statement to see if the specified time has elapsed. If it has elapsed, the ON TIMER event-handling routine is executed.
- TIMER OFF disables timer event trapping. If an event takes place, it is not remembered if a subsequent TIMER ON statement is attempted.
- TIMER STOP disables timer event trapping. However, if an event occurs, it is remembered and the ON TIMER event-handling routine is executed as soon as event trapping is re-enabled using the TIMER ON statement.
- QB64 uses TIMER(number, duration) ON, OFF, STOP or FREE(clears the timer event)