EasyManua.ls Logo

Commodore 128 - Page 276

Commodore 128
448 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
GETKEY
Receive input data from the keyboard, one character
at a time and wait for a key to be pressed.
GETKEY variable list
The GETKEY statement is very similar to the GET statement.
Unlike the GET statement, GETKEY if there is no character in the
keyboard buffer will wait for the user to type a character on the
keyboard. This lets the computer wait for a single character to be
typed. This statement can be executed only within a program.
EXAMPLE:
10 GETKEY A$
This line waits for a key to be pressed. Typing any key continues
the program.
10 GETKEY A$,B$,C$
This line waits for three alphanumeric characters to be entered
from the keyboard. GETKEY can also be used to READ numeric
keys.
NOTE: GETKEY cannot return a null (empty) character
string.
GET#
Receive input data from a tape, disk or RS232
GET# file number, variable list
This statement inputs one character at a time from a previously
opened file. Otherwise, it works like the GET statement. This
statement can be executed only within a program.
EXAMPLE:
10 GET#1,A$
This example receives one character, which is stored in the
variable A$, from file number 1. This example assumes that file 1
was previously opened. See the OPEN and DOPEN statements.
17-34

Table of Contents

Other manuals for Commodore 128

Related product manuals