Vector Basic Interpreter Basic 80 Reference Manual - page 96
8K, Extended, Disk
To read values from a
DATA statement and assign
them to variables.
(See DATA, Section 2.10.)
A
READ
statement
must
always
be
used
in
conjunction
with
a
DATA
statement.
READ
statements assign variables
to
DATA
statement
values
on
a
one-to-one basis.
READ statement
variables may be
numeric
or
string,
and
the
values
read
must agree with the variable
types
specified.
If they
do
not
agree,
a
~Syntax
error" will result.
A single READ statement may access one
or
more
DATA
statements
(they
will
be
accessed
in
order), or several~.
statements
may
access
the
same
DATA
statment.
If
the
num}:)er of
variables in of variables> exceeds the numJ::)er of elements in the DATA statement(s), an OUT OF DATA messaqe is printed. If the number of variables specified is fewer than the number of elements in the DATA statement (s), subsequent READ statements will beqin reading data at the first unread element. If there are no subsequent READ statements, the extra data is ignored. To reread DATA statements from the RESTORE statement (see 2.57) the start, use RESTORE, Section • 80 FOR 1=1 TO 10· 90 READ A(I) 100 NEXT I 110 DATA 3.08,5.19,3.12,3.98,4.24 120 DATA 5.08,5.55,4.00,3.16,3.31 Thia proqram.segment READs the values DATA statements into the array execution, the value of A(1) will be so on. from the A. After 3.08, and