53
ON HOUR_SHARP GOSUB …
Purpose To activate “HOUR_SHARP Event Trigger”.
Syntax ON HOUR_SHARP GOSUB SubName|SubLabel
Remarks “SubName|SubLabel” is the name or line label of a subroutine.
When the system time is on the hour, a specific subroutine will be executed.
Example
ON HOUR_SHARP GOSUB OnHourAlarm
…
OnHourAlarm:
CurrentTime$ = TIME$
Hour% = VAL(LEFT$(CurrentTime$, 2))
FOR I = 1 TO Hour%
BEEP(800, 10, 0, 10)
WAIT(100)
NEXT
ON KEY … GOSUB … 8500
Purpose To activate “FUNCTION KEY Event Trigger”.
Syntax ON KEY(number%) GOSUB SubName|SubLabel
Remarks “number%”
is an integer variable in the range of 1 to 12, indicating a function
key of the keypad.
“SubName|SubLabel” is the name or line label of a subroutine.
When a function key is pressed, a specific subroutine will be executed.
Example
ON KEY(1) GOSUB On_Shift
ON KEY(2) GOSUB Off_Shift
…
On_Shift:
Mode$ = “IN”
RETURN
Off_Shift:
Mode$ = “OUT”