beautypg.com

Keypad commands, 11 keypad commands – Argox PA-20 Basic Programming Manual User Manual

Page 56

background image

PT-Basic Programming Manual Ver. 1.00

55/143

3.11 Keypad commands

CLR_KBD

Purpose: To clear the keypad buffer.

Syntax: CLR_KBD

Example: CLR_KBD

Description: This command will clear keypad buffer.

INKEY$

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.

INPUT_LEN

Purpose: To set or get input length 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.