106
User
's Handbook
to
the Atari 400/ 800 Compute
rs
notify
the
user that
not
enough
data
was
supplied.
Numeric
variables can
only
accept
numbers
as
input.
Standard
notation
and scientific
notation
are
both
acceptable. For
example
, 3.14159266, 2.
85E-l0,
.0001,
35
and
-45
are all
acceptable
data items. Expressions
will
not
be eva luated. They
will
cause an
Input
Statement Error (#8).
Numeric
data must
not
include
commas.
10
DIM
A$(10)
20
FOR I = 0
TO
4
30
READ A$, A
40
PRINT A$, A
50
NEXT
I
EXAMPLE
60
DATA
PENCILS
, 20,PENS,25,RULERS,40,ERASERS,50,
PAPER
,
200
,GLUE,5
The
preceding
example shows a
correct
sequence
for
reading
string and
numeric
data
int
o
correct
variables.
However,
the
READ statement
is
only
ca
lled 5 times,
and
there
are 6
sets
of
data.
Th
is
wi
II
not
ca
use
an
error,
but
the last set
of
data
(G
LU
E,5)
will
never
be read.
DATA
statements can appear
anywhere
in a
program
, even after
an END statement,
However,
any statement that
follows
a
DATA
statement
on
the
same
line
will
not
be executed.
Data can
only
be read
once
unl
ess
a
RESTORE
statement
is
executed
. The
correct
use
of
RESTORE
is al
so
explained in this
chapter.
DEG (DE.)
The
DEG
statement
causes
the
trigonometric
functions
to
be
performed
in degrees instead
of
radians. The
functions
will
be
performed
in radians
until
degrees are specified. Also, radians
will
be used
after
a
SYSTEM
RESET,
NEW,
or
RUN
command.