INPUT#
is
valid only in program mode and only when referencing a logical
file
that
has
been opened for input. For
input
from the tape cassette, the
PET
prints the
following
message if no tape control keys are pressed when
INPUT#
is
executed. Otherwise, no messages are printed.
PRESS
PLAY
ON
TAPE
# 1
OK
• when a tape control key
is
depressed
Examples:
1000INPUT#10,A
946INPUT#12,A$
900INPUT#5,B,C$
LET
...
=
Input
the next data item,
which
must
be
in
numeric form, and assign the value ta variable
A.
Input
the next data item
as
a string and assign it
ta variable A$.
Input
the next
two
data items and assign the
first ta numeric variable B and the second
ta
string variable
C$.
The
Assignment
statement.
LET
...
=,
or
simply
=,
assigns a value
ta
a
specified variable.
Format:
{
(blank)}
var=data
LET
where:
var
is
a numeric
ai
string variable.
data
is
a constant. variable, or expression represent-
ing the value ta
be
assigned ta var. Data
must
agree in type
with
var.
The
ward
LET
is
optional and
is
usually omitted in
PET
BASIC programs. The
assignment statement may
be
used in program or immediate mode.
Examples:
10
A=2
450
C$="'"
"
300
M(l ,3)=SGN(X)
310 XX$(I,J,K,L) ="STRINGALONG"
135