Owner's Manual
67
Example:
80 PRINT NAME$; "IS COMING"
230 PRINT "SUM="; A+B+C
READ AND DATA
When it is necessary to enter a lot of information or data into the computer, using the
INPUT statement can be very time consuming. To help out use the READ and DATA
commands.
Example:
10 DATA 10,60,70,80,90
20 READ A,B,C,D,E
30 PRINT A;B;C;D;E
RUN
10 60 70 80 90
The READ statement consists of a list of variable names with commas between each variable.
The DATA statement consists of a list of expressions separated by commas. These
expressions can be either numeric or strings. The READ statement makes the computer
look up the value of its variables from the DATA statement. When the computer goes
to READ first it will assign the first expression from the DATA list. The next time it goes
to READ it will assign the second value and so on. If the READ runs out of DATA you
will get "? OUT OF DATA ERROR."
RESTORE
If you want to use the same data later on in the program you can do so by using the
RESTORE statement.