Read/Data/Restore - Sanyo MBC-550 Series User Manual

Table of Contents

Advertisement

READ/DATA/RESTORE
Purpose
The READ and DATA are used with combination; the con­
stant defined by the DATA statement is read into the
variable defined by the READ statement.
The RESTORE
instruction resets the pointer which indicates the data
of the DATA statement.
Form
READ <variable>{,<variable>}
DATA <constant>{,<constant>}
Description
(1) <variable> can be a character of numeral and is
written having one to one correspondence with the <con-
stant> of the DATA statement.
can be written for one DATA statement, or vice versa.
Several READ statements
(2) The DATA instruction can be placed anywhere and any
times in the program. The READ instruction reads the
constants of the DATA sequentially.
(3) If the variables in the READ statement are numerals
and the corresponding constants of the DATA statement
are characters, an error occures.
(J|) If the variables of the READ and the constants of
the DATA are numerals with different types, the con­
stants are converted to the variable type before read­
ing.
If they cannot be converted an error occurs.
(5) If , (comma) or : (colon) is included in the char-
3-75

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents