RESTORE

The RESTORE command resets the DATA pointer to the specified DATA statement. If int-exp is not specified, the pointer will be reset to the first DATA statement in the program. Otherwise, it will be reset to the line number specified by int-exp.

Program Example.

00100 REM A demonstration of the RESTORE statement 
00110 DATA 10,20,30 
00120 DATA 50,60,70 
00130 DATA 1,2,3 
00150 READ A,B,C :REM The computer finds the first DATA statement 
00160 PRINT A,B,C 
00170 RESTORE 130 : REM READ line 130 instead of line 120. 
00180 READ A,B,C 
00190 PRINT A,B,C 
00200 RESTORE 120 : REM Avoids the OUT OF DATA error 
00201 READ A,B,C 
00210 PRINT A,B,C 
00220 RESTORE : REM RESTORES the data pointer to the first data statement. 
00230 READ A,B,C 
00240 PRINT A,B,C 
00250 END

Try it

See also HIRES, LORES, PCG, SET