EXECUTES THE PROGRAM FROM LABEL L WHEN THE SYSTEM OBJECT NUMBER N TRIGGERS
ACTION
The command ON_TIMER N,L assigns a label (which must be defined in the program) from which the program will run every time the TIMER designated by the number N is triggered.
The system object must be of the type TIMER.
SYNTAX:
ON_TIMER N,L
USE ERROR EXAMPLE
rem each second, displays a number from 1 to 10 then stops
label count
dim i%
rem create a TIMER
timer 1
on_timer 1,count
end
count:
i%=i%+1
print i%
if i%=10 then timer_off 1
return
ON_TIMER
ON_TIMER N,L
SEE ALSO
TIMER
TIMER_INTERVAL
TIMER_ON
TIMER_OFF
TIMER_OFF_ALL