RESTORE
Statement/Command
RESTORE is used in conjunction with READ and DATA to make READ take values from a particular DATA statement instead of the first or next DATA statement in the program.
How to use RESTORE
RESTORE normally forms a statement in a program. It is optionally followed by a numeric value, for example
160 RESTORE 800
The value is rounded down to the nearest integer if necessary, and should then be the number of a line in the program containing a DATA statement. Following RESTORE, the next READ statement will assign the value contained in this DATA statement. If the numbered line does not exist or does not contain a DATA statement, then READ goes to the next DATA statement after this line. If there are no further DATA statements in the program, then error E (Out of DATA) results.
If RESTORE is followed by 0 or no value, then the next READ statement goes to the first DATA statement in the program.
Format
- RESTORE [int-num-expr]
See also