6-2
Program Commands
Example:
10
DATA
1,2,3
20
READ
A,B
30
PRINT
A:B
40
DATA
4,5
50
READ
C,D,E
60
PR
INT
C;
D;
E
70
END
*Reads data sequentially from a DAT A statement and displays them.
RESTORE
Function:
[Line No.]
Numeric expression
Specifies the location
of
data to be read by a READ statement.
Parameter:
®
Line No.:
Numeric expression. Values below the decimal point
are discarded.
1
.,;:
line No .
.,;:
9999
- -
Explanation:
1) Specifies a DATA statement where data
to
be read
by
a READ statement
exist.
2) When a line number
is
omitted, the data specification
is
cancelled. After this,
the first data in the program area where a READ statement exists are
speci-
fied and read
by
the first READ statement
that
is
executed.
3) When a line number
of
the program area
is
specified
by
a RESTORE state-
ment, data
of
the DATA statement with this line number are read sequential-
ly by the READ statement.
4) When a specified line number does
not
exist or a DATA statement does
not
exist on a specified line number and after, an error (Error
4)
occurs.
125