EasyManua.ls Logo

Atari 800

Atari 800
326 pages
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...
170 User's
Handbook
to
the
Atari
400/ 800
Computers
READ (REA.)
A READ statement
is
used
to
assign values
to
variables. The values
are taken
individually
from
DATA
statements in
the
order
they
appear in the
program
.
CONFIGURATION
READ
Data items are assigned
to
variables in
the
order
in
which
they
appear in
the
program
unless a
RESTORE
statement
has
been
executed.
The
type
of
variable in the READ statement must
correspond
to
the
type specified in DATA. A
numeric
variable can
only
be
assigned a
num
eric value.
However,
a string variable can accept
any type
of
characters
or
none
at all.
String variables must be
correctly
dimensioned
before
the
READ
statement
for
that variable
is
executed.
A
program
must
includ
e at least
as
many data items
as
the
number
of
variables in its READ statements unless a
RESTORE
statement
is
executed.
EXAMPLE
10
DIM
X$(10)
20
READ
X,X$
30
PRINT
X$,X
40
END
50
DATA
12
,
JONES
RUN
JONES
12
The
preceding
example contains a
program
that
has
a
READ
statement. First, the string variable
X$
is
dimensioned
. Next, at
line
20,
the
variables X and
X$
are assigned
the
values
from
the
DATA
statement
at
line
50. At
line
30,
the values
of
the
two
variables are displayed.

Other manuals for Atari 800

Related product manuals