Toshiba KB-80 Computer Keyboard User Manual


 
- 60 -
READ
Function Reads a value defined by a DATA statement and assigns it to a variable.
Format READ <constant> [, <constant> ] ···
Term <variable>: The variable to which the value for the DATA statement is assigned
(Numeric or character variables)
Explanation The READ statement should always be used with the DATA statement. The READ
statement reads the data of the DATA statement starting from the beginning, and
assigns one data to one variable.
Both numeric and character variables are available for the variable in the READ
statement. However, if the variable type in the READ statement does not match the
data type in the DATA statement, a “Syntax error” occurs. When the value for the
DATA statement is numeric, both numeric variables and character variables are
allowed.
One READ statement can read the values for more than one DATA statement, and
more than one READ statement can also be used to read the value for one DATA
statement. If the number of <variable>s exceeds the number of data of the DATA
statement, an “Out of data” error occurs. When the number of <variable>s is less
than the number of data of the DATA statement, the next READ statement assigns
the data to the variable in the order starting from the first data in the data which has
not yet been read. If there are not more READ statements, the remaining data is
ignored.