Sharp PC-1403 Operation Manual page 173

Hide thumbs Also See for PC-1403:
Table of Contents

Advertisement

167
Loads the values from
the DATA
statement
into
B(
)-
8(1)
is
10,
8(2)
is
20,
8(3)
is
30,
etc.
Set up an
array.
10 DIM 8
{10)
20
WAIT32
30
FOR
1=1 TO
10
40 READ
8(1)
50 PRINT 8(1}*2
60 NEXT
I
70
DATA 10 20 30 40 50 60
80 DATA
70
80
90
100
90 END
Examph~s
•au
When assigning
initial values to
an array,
it is
convenient to
l
i
st
the
values
in
a
DATA
statement
and use a READ
statement in a
FOR
...
NEXT
l
o op
to load
the values into
the
array.
When
the first READ
is
executed.
the first
value in the first DAT
A statement
is
returned.
Succeeding
READs use
succeeding
values in
the sequential order in which
they appear in the
program,
regardless
of
how
many values
are
li
s ted in each DATA
statement or
how many DAT
A
statements are
used.
If
desired,
the
values
in a
DATA
statement
can
be
read
a
second
time by
using the
RESTORE
statement.
1µm+Mi
The READ verb
is
used to read values
from a DATA
statement
and
assign them to
variables.
See
also: DATA,
RESTORE
Abbreviations:
REA.
1
READ
variable list
Where: variable
list
is:
variable
or:
variable
,
variable list
Verbs
READ

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents