60
User's
Handbook
to
the Atari 400/ 800 Computers
In
multiple
line
statements,
the
REM
statement must be
the
final
statement. The Atari BASIC
interpreter
ignores all text
following
the
keyword
REM.
REM can be abbreviated
as
R.
or
with
the
period
(.)
.
Assignment Statements
Assignment statements
were
discussed
briefly
earlier
in
this
chapter. Assignment statements are used
to
assign values
to
variables. The
following
are examples
of
assignment statements.
100
LET
A = 7
200
B =
42
300
NAME$ =
"phil"
400
X=1
:Y=2:Z=3
Notice
that
the
keyword
LET
is
optional.
Generally,
LET
is
assumed. Both string and
numeric
variables can
be
assigned
values
with
an assignment statement. Also,
multiple
assignment
statements can
be
included
in a single line,
as
longaseach
of
the
individual
statements
is
separated by a
colon
.
DATA,
READ
Assignment Statements
Assigning values
to
a large
number
of
variables
with
individual
assignment statements
could
prove
very cumbersome. The
DATA,
READ statements can be used
to
assign values
to
a large
number
of
variables. The
following
is
an
example
of
a DATA,
READ statement.
100
DATA 100,500,1000, "Jack"
200
READ A,
B,
C, D$
The
DATA
statement creates a list
of
constant values
known
as
a
DATA
list.The items
in
the
DATA
list are assigned sequentially
to
the
variables
in
the
READ statement. A OAT A list
is
depicted
in
Illustration
3-4.