RESTORE [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Reference Manual
RESTORE
The RESTORE statement resets the data pointer to the beginning of a DATA
statement so that the data can be reused.
Syntax
RESTORE [line_id]
Parameters
line_id Line identifier of a DATA statement in the same program
unit as the RESTORE statement. The RESTORE statement
positions the data pointer at the first datum in the
specified DATA statement. If no line_id is specified,
then the data pointer is positioned to the first datum
in the first DATA statement in the program unit.
Example
100 DATA 1,2,3
110 DATA 4,5,6
120 READ A,B,C !A=1, B=2, C=3
130 READ D,E,F !D=4, E=5, F=6
140 RESTORE 110 !Applies to line 110
150 READ G,H,I !G=4, H=5, I=6 (from line 110)
160 RESTORE !Applies to line 100 (by default)
170 READ J,K,L !J=1, K=2, L=3 (from line 100)
999 END
MPE/iX 5.0 Documentation