CHAPTER 7.
Command Reference
Example:
146
7-2
Program Commands
KEYS
.
®
Function:
Enters one character from the keyboard.
Explanation:
1) Accepts the input of only one character from the keyboard.
2) Numerals, alphabetical letters and symbols can be input.
3) The data entered will be in single character form.
4) Null will occur when there is no key input.
*KEY$ can be abbreviated as KEY.
Example:
19 PRINT*BEEP"$
20 AS=KEYS
=
3@ IF A$=*@"THEN
BEEP @
4@ IF A$="1"THEN
BEEP
1
5@ |F AS='E'THEN
7@
7
_6@ GOTO 2@
7@ PRINT:PRINT*END"
8@ END
Repeated until the{E] key
js pressed.
*A low sound will be generated. when the ©) key is pressed and a high sound
will be generated when the (1) key is pressed. "END" will be displayed and the
program will be terminated when the (E) key is pressed.
147