HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
2-: 26
|| | |
---------------------------------------------------------------------------------------------
|| | |
|
line_num
| Ignored. | Current program lines from |
|| |
line_num
to the end of the program |
| | | are deleted. Default for
line_num
|
| | | is one. Lines before
line_num
are |
| | | not affected. First retrieved |
| | | line is renumbered
line_num
;if |
| | | its old line number was
n
, then |
| | | the number (
line_num - n
) is added |
| | | to every line number in the |
| | | retrieved lines (their own line |
| | | numbers and the line numbers that |
| | | they reference). |
|| | |
---------------------------------------------------------------------------------------------
|| | |
|
execution_line
|If
execution_line
is specified, | If
execution_line
is specified, |
| | the new program begins executing | the resulting program begins |
| | at that line. The line must be in | executing at that line. The line |
| | the main program. If | must be in the main program. |
||
execution_line
is not specified, | |
| | and a program executed the GET | |
| | statement, then the new program | |
| | begins executing at its first | |
| | line. If
execution_line
is not | |
| | specified, and the GET command was | |
| | executed, control returns to the | |
| | terminal. | |
|| | |
---------------------------------------------------------------------------------------------
Examples
The contents of Filea and Fileb are:
Filea (BASIC SAVE) Fileb (ASCII)
------------------------------------------------------------------------------------
10 PRINT "Program A" 10 PRINT "Program B"
20 CALL A_sub 20 CALL B_sub
30 PRINT "END of Program A" 30 PRINT "End of Program B"
40 STOP 40 STOP
100 SUB A_sub 100 SUB B_sub
110 PRINT "In subprogram A_sub" 110 PRINT "In subprogram B_sub"
120 SUBEND 120 SUBEND
Example 1
The following examples show the effect of the GET statement of an ASCII
file while there is a program in the interpreter. Lines beginning with
line_num
are deleted from the first program.
>GET "Filea"
>LIST
! Filea
10 PRINT "Program A"
20 CALL A_sub
30 PRINT "End of Program A"
40 STOP
100 SUB A_sub
110 PRINT "In subprogram A_sub"
120 SUBEND
>GET "Fileb",40
>LIST