Radio Shack TRS-80 PC-3 Owner's Manual page 162

Table of Contents

Advertisement

1 READ variable list
Where: variable list
Abbreviations: REA.
is:
variable
or: variable, variable list
Sea also: DATA, RESTORE
Purpose
The READ verb is used to read values from a DATA statement and assign them to variables.
Use
When assigning initial values to an array, it is convenient to list the values in a DATA statement and use a READ statement in a
FOR ... NEXT loop to load the values into the array. When the first READ is executed, the first value in the first DATA state-
ment in returned. Succeeding READs use succeeding values in the sequential order in which they appear in the program, regard-
less of how many values are listed in each DATA statement or how many DATA statements are used.
If desired, the values in a DATA statement can be read a second time by using the RESTO REstatement.
162

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents