RESTORE can be used at any time in a program to set the line where DATA is read from.

RESTORE on its own resets the data pointer to the first data item in the program.

RESTORE followed by a parameter sets the data pointer to the first item of data in the specified line (or the next line containing a DATA statement if the specified line does not contain data). This optional parameter for RESTORE can specify a calculated line number.

RESTORE (10*A+20)

You can use RESTORE to reset the data pointer to the start of your data in order to re-use it. alternatively, you can have several DATA lists in your program and use RESTORE to set the data pointer to the appropriate list.


Associated Keywords