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...
Atari BASIC Reference
Gu
ide
105
DATA
(D.)
The
DATA
statement supplies a list
of
information
that
is
used in
a
program
through
READ statements. A
DATA
statement can
includ
e
numeric
values, string values,
or
both.
String variables
must
have been
dimensioned
before
being
read.
Data items are separated by commas.
Therefore
, string values
that contain commas
will
be read
as
separate data items. For
example,
DATA
DOE, JOHN
is
a
DATA
statement
with
two
data
items.
However
,
DATA
DOE. JOHN
has
only
one
item.
CONFIGURATION
DATA
a[b
1...
a$
,
b$J
Data must be read
into
the
correct
type
of
variable. A string
variable can accept data in any
form.
EXAMPLE
10
DIM
A$(20)
20
FOR
I = 1
TO
5
30
READ A$:? A$
40
NEXT
I
50
DATA
TOM
c.
,
25
,,
3 + 4 * %,247
RUN
TOM
C.
25
3 + 4 * %
247
The
preceding
example shows
correct
data
for
a string variable.
Notice
the
blank
line in the
output
that c
orresponds
to
the
two
commas in a row. This
is
read
as
a string value
with
no
characters
and l
ength
equal
to
zero.
If
only
4 data items had been
supplied
with
this
program
,
the
message: ERROR-6 AT LINE
30
would
have been displayed
to

Other manuals for Atari 800

Related product manuals