Directives
ADDR Load & Lock Program in Memory
   
Format ADDR prog_name$[, ERR=stmtref]
 
Where:
prog_name$ Name of the program to be loaded and kept in memory. String expression. If you omit the pathname, ProvideX search rules apply.
stmtref Program line number or statement label to which to transfer control.
   
Description The ADDR directive loads the specified program into memory and keeps it there until you unload it.

For as long as the ADDR-loaded program is in memory, that specific program will be referenced (using its absolute path) even if you change the system PREFIX or current directory after executing the ADDR directive. That is, all subsequent references to any program whose name matches that string will still refer to the ADDR-loaded program.

You can see this in the example below. When the program is executed, ProvideX ADDR-loads "DATECHK", changes directories and executes the ADDR-loaded program even though there is a different current directory and a different program with the same name might exist in that directory.

To unload a program which is ADDR-loaded, either use the DROP directive or execute the START directive.

   
See also DROP Removes Program from Memory
START Restart ProvideX
   
Examples 0010 CWDIR "USR/UTILS"
0020 ADDR "DATECHK"! USR/UTILS/DATECHK is loaded in memory.
0030 CWDIR "USR/AR"! New working directory: could contain a different DATECHK.
0040 RUN "DATECHK" ! Still runs USR/UTILS/DATECHK