RESTORE

If you want to use the same data later on in the program, you can do so by using the RESTORE statement.

Example:

10DATA 1,3,8,9

20READ A,B,D

30RESTORE

40READ X,Y

50PRINT A;B;D

60PRINT X;Y

70END

RUN

13 8

13

The RESTORE command makes subsequent READ statements get their values from the start of the first DATA statement.

Example:

10REM FIND AVERAGE

20DATA 0.125,3,0.6,7

30DATA 23,9.3,25.2,8

40S=0

50FOR I=1 TO 8

60READ N

70S=S+N

80NEXT

90A=S/8

100PRINT A

RUN 9.52813

64