READ
Statement/Command
READ is used in conjuntion with DATA to assign values to variables using the values in a DATA statement.
How to use READ
READ is normally used to form a statement in a program. It is followed by one or more numeric variables or string variables each separated by a comma, for example
20 READ a$,x
When READ is first executed, it takes the same number of values as there are variables from the first DATA list and assigns the values to the variables in order. When READ is next executed, the next set of DATA values is assigned to the variables named in the READ statement and so on.
For further details, see DATA.
Format
- READ num-var [,num-var] [,string-var]
- READ string-var [,num-var] [,string-var]
See also