READ#
Purpose
Reads data from DATA BANK area.
READ# variable name [ , variable name ]*
Parameters
variable name
Explanation
- Sequentially reads data stored in the DATA BANK area and assigns them to variables.
- Numeric data can only be read into numeric variables, and string data only
into string variables. Mismatching data and variables generates an error.
- Data items can be delimited by commas.
- A DA error is generated when data are not present to be read.
- The read sequence can be altered using
RESTORE#
command.
- Spaces in front of data items are skipped.
- Data included within quotation marks are read as a single string.
- This command cannot be executed in the CAL mode, but in the BASIC mode.
See
Sample Program
10 RESTORE# "READ", 0, 50
20 READ# A$
30 PRINT A$
40 GOTO 10
50 PRINT "NO DATA!"
Searches and displays data items which start with “RED” within DATA BANK function.
Message “NO DATA!” appears when such data items are not found.