beautypg.com

On keypad – Remote Processing CAMBASIC User Manual

Page 122

background image

Comm ands - 89

ON KEYPAD$

Tasking Statement

SYNTAX:

ON KEY PAD $ GO SUB line/label
O N K E Y P AD $ G O SU B
ON KE YPAD $ size GOS UB line/lable
ON KE YPAD $ size G O S U B

PURPOSE:

To cause a progr am br anch wh en any key is p ressed on the keypad. Using this com mand w ithout a
line/label disables keypad tasking.

REMARK S:

The program branch will respond to any key being pressed. The interrupt service routine can then
filter the character s.

The first two syntaxes are for the RPC-2300 and RPC-150. O nly a 16 position keypad is supported
on these cards.

The last two syntax are for the RPC-2350 and RPC-2350G. size specifies the keypad size of 16 or
24.

RELATED:

KEYPA D$, SYS(8)

EXAMPLE:

10 ON KEYPAD$ GOSUB 70
20 '
30 GOTO 20
.
.
70 PRINT KEYPAD$(0)
80 RETURN

ERROR:

< Can’t compile> – if line/label does not exist