112
CipherLab BASIC Programming Part I
INPUT
Purpose To take user input from the keypad and store it in a variable.
Syntax INPUT variable
Remarks “variable” is a numeric or string variable th
at will receive the input data. The
data entered must match the data type of the variable.
When the input task is properly ended with the ENTER key being pressed, the
data string will be stored in a variable. Otherwise, press the ESC key to abort
the task, and the string will be cleared.
Example
INPUT String$
PRINT String$
INPUT Number%
' input a string variable
' input a numeric variable
INPUT_MODE
Purpose To set the display mode of the input data.
Syntax INPUT_MODE(mode%)
Remarks “mode%” is an integer variable, indicating the input mode.
0
1
2
Nothing will be displayed on the LCD.
The input characters will be displayed on the LCD. (default)
“*” will be displayed instead of the input characters. Usually,
is applied for password input.
Example
LOCATE 1, 1
INPUT_MODE(1)
INPUT Login$
LOCATE 2, 1
INPUT_MODE(2)
KEY_CLICK
Purpose To enable/disable the key click sound.
Syntax KEY_CLICK(status%)
Remarks “status%” is an integer variable, indicating the key click status.
The key click is enabled by default.
0
1~5
Disable key click (mute mode)
Enable key click (each represents a different tone)
Example
KEY_CLICK(0) ‘ disable the key click