HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)

4- 126
RESAVE KEY
The RESAVE KEY statement's action is dependent on whether a filename
parameter is included in the statement. If a filename parameter is
included and the file does not previously exist, the RESAVE KEY statement
stores the typing aid definitions in a BKEY file. The file to which the
information is saved has a special format and a BKEY file code. If no
filename parameter is specified, the RESAVE KEY statement causes HP
Business BASIC/XL to store the current typing aid key definitions
internally as the current definition. The RESAVE KEY statement does not
save information for keys defined as branch-during-input keys, it saves
only the key definition information for keys defined as typing aid definitions.
The file referenced by
fname
must exist and have a BKEY file format. An
error occurs if the format is not correct. If any user-definable keys have been
defined as branch-during-input keys when a RESAVE or SAVE statement is executed in the
interpreter or in a compiled program, the last typing aid key definition for that key
is the information written to the BKEY file.
Typing aid keys are discussed in detail in chapter 8, User-definable Keys.
Syntax
RESAVE KEY [
fname
]
Parameters
fname
A file name represented by a quoted string literal, an
unquoted string literal or a string expression as
described in chapter 6.
Examples
RESAVE KEY typeaid
200 RESAVE KEY typeaid1 !File is typeaid1
210 RESAVE KEY Filename$ + "." + Groupname$ !Uses the data in Filename$
211 !and Groupname$
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