English
Language : 

NSB8 Datasheet, PDF (65/158 Pages) List of Unclassifed Manufacturers – BASIC interpreter for Z80 family
ITALIAN TECHNOLOGY
grifo®
RESTORE
STATEMENT:
RESTORE
RESTORE <line number>
ACTION:
The pointer to the next data item to be READ is moved to the first item in the first DATA statement
in the program text. If a line number is specified, the pointer is moved to the first data item in the
DATA statement at (or the first DATA statement occurring after) the given line.
EXAMPLE PROGRAM:
5 REM Example of RESTORE
10 READ A \ PRINT A
20 RESTORE
30 READ A \ PRINT A
40 RESTORE 70
50 READ A \ PRINT A
60 DATA 1, 2, 3, 4
70 DATA 5, 6, 7, 8
Running tha above program produces the output:
1
1
5
REMARKS:
RESTORE provides a means by which the same information in DATA statements may be READ
more than once by a program. RESTORE makes it possible to recycle data (as shown in lines 10 to
30 in the example program), or skip around the data (as in lines 40 and 50).
The RUN command causes an automatic RESTORE (to the first DATA statement).
ERROR MESSAGES:
Same at statement GOTO
SEE ALSO:
Statement READ
Statement DATA
NSB8
Rel. 5.10
Page 53