TIMER (statement)

From QB64 Wiki
Revision as of 21:08, 5 November 2010 by imported>Clippy
Jump to navigation Jump to search

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)


See also:

ON TIMER(n), TIMER, _DELAY




Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page