FANDOM


Syntax

TIMER number

TIMER "FALSE

Explanation

TIMER starts a timer. Its input is the timer tick interval in 1/100 seconds. Each time the timer ticks, a TIMER event is generated. A Logo procedure tied to this TIMER event by DEFEVENT, is called at regular intervals.

If you use FALSE as input for the TIMER command, the timer stops. The timer also stops if you press Control-G. The built-in event handling procedure for the BREAK event stops the timer before returning to toplevel.

The output is the previous value given as input for the TIMER command.

Example

In the following example, the procedure TICK is called one every second.

? TO TICK

> PRINT [TICK TICK TICK]

> END

TICK defined.

? DEFEVENT "TIMER "TICK

? TIMER 100

Result: FALSE

? TICK TICK TICK

TICK TICK TICK

TICK TICK TICK

TICK TICK TICK

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.