56
CipherLab BASIC Programming Part I
ON MINUTE_SHARP GOSUB …
Purpose To activate “MINUTE_SHARP Event Trigger”.
Syntax ON MINUTE_SHARP GOSUB SubName|SubLabel
Remarks “SubName|SubLabel” is the name or line label of a subroutine.
When the system time is on the minute, a specific subroutine will be executed.
Example
…
ON MINUTE_SHARP GOSUB CheckTime
…
CheckTime:
CurrentTime$ = TIME$
Hour% = VAL(MID$(CurrentTime$, 3, 2))
IF Hour% = 30 THEN GOSUB HalfHourAlarm
RETURN
…
HalfHourAlarm:
BEEP(800, 30)
WAIT(100)