RESTORE
RESTORE
Section titled “RESTORE”Syntax
Section titled “Syntax”RESTORE [<label>]
RESTORE statement is used to change the order in which DATA lines are read. The RESTORE label statement will make the next READ to get the data from the label line onwards. If no label is specified, the data reading sequence is restarted from the beginning.
Example
Section titled “Example”RESTORE numbers
FOR i = 1 TO 3 READ a PRINT aNEXT i
REM These will be skipped by the RESTORE abovestrings:DATA "Hello world!", "ZX Spectrum", "ZX Rules!"
REM This will be read since RESTORE pointed to numbers: labelnumbers:DATA 10, 20, 30
This will output:
10 20 30
Notice the strings section has been skipped over.
Remarks
Section titled “Remarks”- This statement is Sinclair BASIC compatible.