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

2-: 30
MERGE Statement
The MERGE statement is identical to the LINK statement, except in the
following ways:
* A current line is replaced only if its line number belongs to a
retrieved line. The retrieved line may have the same line number if
it has been renumbered.
* If a subunit header (a SUB or DEF statement) is inserted anywhere
except immediately before another subunit header, it becomes a
comment and a warning is issued.
* If a subunit header is replaced by anything but another subunit
header, an error occurs. Lines retrieved before the error occurred
remain in the program.
Syntax
MERGE
fname
[,
line_num
][;
execution_line
]
Parameters
fname
The filename of the file containing the program stored
in the ASCII or BASIC DATA file to be retrieved.
line_num
Line number to be assigned to the first retrieved line.
Retrieved lines are not renumbered if this parameter is
not specified.
execution_line
Line identifier where execution resumes after the file
is retrieved. The default is the line following the
MERGE statement (or the line following the line that
replaced the MERGE statement).
Execution does not resume after a MERGE command unless
execution_line
is specified.
Examples
MERGE "File1" !File1 is retrieved
MERGE "File2",100 !File2 is retrieved, the first line is line 100
MERGE "File3",250;250 !File3 is retrieved, the first line is line 250
!and the current program resumes at line 250
MERGE "File4";600 !File4 is retrieved, and the current program
!resumes at line 600
RESAVE Statement
The RESAVE statement stores the current program in an existing or a new
disk file. It can store a file in the ASCII, BASIC DATA, or BASIC SAVE
formats.
Syntax
[LIST ]
RESAVE [BDATA] [
fname
[,
line_range_list
][; NOMSG]]