Table of Contents

Advertisement

124
CHAPTER 6 Command
Reference
A space
following data
is
not disregarded.
Therefore, an error
will
be
generated
if a space
is
inserted after
numerical data.
Example:
DATA 1,
2~,
3,
4~
'-------'--These spaces are
not
disregarded.
READ
Variable name [, [variable name] ]
*
Function:
Reads the content of a DATA statement.
Parameter:
Variable
name:
Explanation:
Numeric variable or character variable.
An array variable
can
be used.
®
1) Allocates data
in
the currently specified DATA statement sequentially to a
specified variable.
2) Only numeric
type
data can be read for a numeric variable.
3) Data
in
DATA statements are read sequentially with the smallest line number
first, and sequentially from the beginning in a statement.
4) After the necessary
data
are read by a READ statement, the following data
are read by the next READ statement.
5) The first data in the program area where a READ statement exists is read by
the first execution of
this
statement after which data in
the
program area at
that time are read sequentially.
6) The specification of data to be read can be changed by a RESTORE state-
ment.
7) When the number of data in a DATA statement is smaller than the number of
variables
in
a READ statement, an error (Error 4)
occurs.
8) When a space exists at the beginning of data, it is skipped.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents