HP 9000 200 Series Manual page 69

Using the basic 5.0/5.1 system
Table of Contents

Advertisement

Assuming the file contains valid program lines that were placed in the file by a SAVE
operation, and their line numbers are still valid after any renumbering that is specified,
the lines will be entered into program memory. If there is a syntax error in any of the
program lines in the file, the lines in error are turned into comments, error 68 is reported,
and the syntax error message is sent to the system printer. This might happen if the
program was written and saved on a computer that had a vf"rsion of BASIC different
from the one being used for the GET operation. This may also happen when a "language
extension" binary is required for using the keyword, but the binary is not currently loaded
into memory.
Using GET to Specify Run Line
GET can also specify that program execution is to begin. This is done by adding two
line identifiers:
• thf" first line numlH'r specifif"s the placement and renumbering
• the second line number specifies the line at which execution is to begin.
For example, assume there is no program in memory and an ASCII file "RATES" contains
valid program lines. A typical command to bring the contents of this file into memory
and begin execution at the line 10 is:
GET "RATES",10,10
If there is already a program in memory, an append and run is allowed. For example:
GET "RATES", 250,100
specifies that any existing lines from 250 to the end of the program in memory are to be
deleted, the contents of file "RATES" is to be renumbered and appended to the program
in memory beginning at line 250, and then normal program execution is to begin at line
100. Although any combination of line identifiers is allowed, the line specified as the
start of execution must be in the main program segment (not in a SUB or user-defined
function). Execution will not begin if there was an error during the GET operation. For
further information about this use of GET, see the "Chaining Programs" section of the
"Program Flow" chapter in BASIC Programming Techniques.
Using GET to Append
You can also use GET to append the contents of an ASCII file to an existing program.
See the "Editing and Storing Programs" chapter or the BASIC Language Reference for
details.
4-6
T
,n~rlin(J ~Drl
Thmninp' PnwramR
--- ' - -"""-...........
~--o
-~
- - - -
" - - - - - - - - 0
-
~
- 0
- - -

Advertisement

Table of Contents
loading

This manual is also suitable for:

9000 300 series

Table of Contents