PI1X Basic Programming Manual Ver. 1.10
55/156
3.11
Keypad commands
Purpose
:
To clear the keypad buffer.
Syntax
:
CLR_KBD
Example
:
CLR_KBD
Description
:
This command will clear keypad buffer.
Purpose
:
To read one character from the keypad buffer then remove it.
Syntax
:
Str$ = INKEY$
Example
:
START:
S$=INKEY$
IF S$<>"" THEN
PRINT ASC(S$)
IF ASC(S$)=27 THEN ‘ESC key
END
END IF
END IF
GOTO START
…
Description
:
Str$
is a string variable to be assigned to character read.
Purpose
:
To set or get input length limit when using “INPUT” or
INPUT_S" command.
Syntax
:
X%= INPUT_LEN
INPUT_LEN=A%
Example
:
INPUT_LEN=4
PRINT "INPUT STRING:"
A%=INPUT("",S$)
…
PRINT “Input length:”; INPUT_LEN
Description
:
A%
is an integer variable. When using “INPUT” or
“INPUT_S” command, it can set limit on input length(When
N%=0 indicating not limit).
X%
is an integer variable, indicating the input length limit.