
Commands - 63
INPUT KEYPAD$
Statement
SYNTAX: INPUT KEYP AD$ echo port,variable
INPUT KEYP AD$ echo port,"text" ,variable
INPUT KEYP AD$ echo port, "text" ;variable
PURPOSE: To input data from a keypad. Optionally print text to echo port
REMARK S: The INPUT KEYP AD$ statement is sim ilar to the IN PUT statement in that the program pauses to
accept data from a matrix keypad.
The echo port parameter tells the system where to echo the keys pressed on the keypad. The display
must be previously initialized for an echo.
0 no echo
1 COM1
2 COM2
3-7 no echo
8 Graphics display (RPC-2350 only, no echo on others)
9 DP display
10 LCD display
11 speaker
12-255 no echo
The INPU T KEYP AD$ statement terminates when a carriage return (< CR> ) is received. One of
the keypad keys must be configured to return a < CR> (13 or&D) w hen pressed using the SYS(8)
command. By default, key position 15 returns a < CR> . A < CR> < LF> sequence is sent to the
echo port when a < CR> is sent. On all echo ports, except the LCD display, the line advanc es.
The cursor retur ns back to the beginning of the line on LC D' s.
"text" is optionally printed to the echo port. This is useful as part of a prompt. The character
following the last quotation (") determines if a question mark (?) is printed or not. A com ma (, )
suppresses printing a ? while a semi-colon (;) will print one.
This command must be initialized by ON KEY PAD$. W hen INPUT KEYP AD$ is executed, the
subroutine specified in ON KEYPAD$ is not executed. Even if you use INPUT KE YPAD $ as your
only keypad input, you must have a valid line number specified as part of the ON KEYPAD$
routine.
variable is a string (for example, NAME $) or numeric (for exam ple, WE IGHT). As with the
regular INPUT statement, any string characters entered into a numeric variable prom pts for a redo.
LCD displays do not pr ompt for a redo, but the cursor returns back to the point wh ere it is
requesting data.
RELATED: KEYPA D$, ON KEY PAD$
Komentarze do niniejszej Instrukcji