A Closer Look at Loading Programs
There are two statements used in BASIC for retrieving programs from mass storage:
•
LOAD-~retrieves
programs stored in a PROG file (using STORE)
• GET-retrieves programs stored in an ASCII or HP-UX file (using SAVE).
These statements can be executed from the keyboard as commands or induded in a
program. vVhen executed as cOIIlmands
1
they are used to Lring a program into the
computer's memory so it can be edited or run. When induded within a program, they
are used to link together the segments of large programs.
Using LOAD
The LOAD command brings in programs from a PROG file, with the option of beginning
program execution at a specified line. It dears any existing program from the computer's
memory and loads the contents of a PROG file. For example, the command:
LOAD "CANNON"
clears the program memory and brings in the contents of the PROG file called "CAN-
NON".
Possible Errors
• If the file is not a PROG file, the LOAD is not performed and error 58 (improper
file type) is reported.
• If the file is not found on the volume, error 56 (file not found) is reported.
• If any lines require a version of BASIC different from the one currently installed,
those lines cannot he listed. edit('d, or execut('d. HOW(,V(,L the LOAD operation
proceeds without error.
4-4
Loading and Running Programs