193
LOAD Directive
Read Program into Memory
Format
LOAD [prog_name$]
Where:
prog_name$ Name of the program to load/read. String expression. To load a
Description
Use the LOAD directive to read a program into memory (i.e., to open or retrieve a
program) for execution, listing, or modification. The program you load into memory
replaces the current program, if any.
On a LOAD, ProvideX resets the FOR/NEXT, GOSUB/RETURN, and WHILE/WEND
stack. Any addresses set in SETERR or SETESC directives are cleared and the current
PRECISION is reset to two. The current DATA pointer is also reset to the start of the
program. No user data areas or files are affected by the LOAD directive.
You can only use the LOAD directive in Command mode or with the EXECUTE
directive. Misuse of the LOAD directive in Execution mode (i.e., without the
EXECUTE directive) generates Error #45: Referenced statement invalid.
If you omit the program filename, ProvideX loads the last file for which there was a
LOAD, RUN, or SAVE. If there is no prior file in the stack, ProvideX returns
Error #10: Illegal pathname specified.
See Also
Saving, Loading, and Executing a Program, User's Guide
Note: ProvideX accepts certain typographical errors. For instance, it accepts LAOD as
a substitute for LOAD.
Examples
LOAD "MYPROG" ! Loads "MYPROG"
LOAD ! Loads last program specified, if any (in this case, "MYPROG")
->DELETE
->LOAD
Error #10: Illegal pathname specified