HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
2-: 29
The following program statement retrieves Subunit_1 through Subunit_4.
Numbering of the first line of Subunit_1 begins at the highest line
number in the current program + 1. The line numbers of subsequent lines
are incremented by 10.
10 GET SUB "SUBFILE"
10 GET SUB "SUBFILE" ;1 !Retrieves Subunit_1 through Subunit_4
10 GET SUB "SUBFILE" ;2,4 !Retrieves Subunit_2 through Subunit_4
10 GET SUB "SUBFILE" ;3,3 !Retrieves Subunit_3
10 GET SUB "SUBFILE",100,10 ;3 !Retrieves Subunit_3 and Subunit_4
and begins numbering at line 100 with
lines subsequently incremented by 10.
LINK Statement
The LINK statement is identical to the GET statement for ASCII and BASIC
DATA files, except in the following ways:
* Busy lines in the current program cannot be replaced (see "Busy Lines
and Busy Subunits" for the definition of "busy").
* Execution must resume within the program unit that executed the LINK
statement.
* The LINK statement does not affect local or common variables in the
current program. Redeclarations are ignored.
Syntax
LINK
fname
[,
line_num
] [;
execution_line
]
Parameters
fname
The filename of the file containing the program in the
ASCII or BASIC DATA file format that is to be retrieved.
line_num
Line number to be assigned to the first retrieved line.
If this parameter is not specified, retrieved lines are
not renumbered.
execution_line
Line identifier that program resumes execution at after
file is retrieved. Must belong to the program unit that
executed the LINK statement. Default is the line
following the LINK statement (or the line that replaced
the LINK statement).
Execution does not resume after a LINK command unless
execution_line
is specified.
Examples
LINK "File1" !File1 is retrieved
LINK "File2",200 !File2 is retrieved, the first line is 200
LINK "File3",300;330 !File3 is retrieved, the first line is 330,
! the current program resumes at line 300
LINK "File4";150 !File4 is retrieved, the current program
!resumes at line 150