VTech Precomputer Power Pad Plus User Manual

Page 68

Advertising
background image

64

RESTORE

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

Example:

10

DATA 1,3,8,9

20

READ A,B,D

30

RESTORE

40

READ X,Y

50

PRINT A;B;D

60

PRINT X;Y

70

END

RUN

1 3 8

1 3

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

Example:

10

REM FIND AVERAGE

20

DATA 0.125,3,0.6,7

30

DATA 23,9.3,25.2,8

40

S=0

50

FOR I=1 TO 8

60

READ N

70

S=S+N

80

NEXT

90

A=S/8

100 PRINT A

RUN

9.52813

Advertising