Basic
INKEY$
Returns a 1-character string from the keyboard without pressing
(ENTER).
If no key is pressed, BASIC returns a null string (length
zero). INKEY$ does not echo the character to the display.
10
A$
=
INKEY$:IF
A$
=
tttt
THEN
10
INP@ort)
Returns the byte read from
port. Port
may be any integer from
0
to
65535.
PRINT INP(255) A=INP(255)
INPUT[;]
[
“prompt”;]variabZe[,variabZe,
...I
Accepts data from the keyboard and stores it in
1
or more variables.
BASIC stops execution and displays
prompt
followed by a question
mark to indicate that the program is waiting for input.
If
you do
not want BASIC to display the question mark, type a comma, in-
stead of a semicolon, after
prompt.
If
INPUT is immediately followed by a semicolon
(;),
BASIC does
not echo the
(ENTER)
key when you press it as part of a response.
INPUT# buffer, variabZe[,variabZe..
.]
Accepts data from a sequential device or file and stores it in a pro-
gram
variable. Buffer
is the number assigned to the file when you
opened
it.
INPUT#I, A,B INPUT#4,
A$,
B$,
C$
INPUT$(number [,[#]buffer])
Inputs a string of characters from either the keyboard or a sequen-
tial access file.
Number
specifies the number of characters to be in-
put and may be in the range
1
to
255.
If
you include
buffer,
BASIC inputs the string from a sequential
access file.
If
you omit
buffer,
BASIC inputs the string from the
keyboard. The number sign
(#)
is not required.
A$=
INPUT$(5)
A$
=
INPUT$(11
,3)
36
Tandy
1000