Programming Guide |
Interpolates the contents of another module at the current statement line
includemodule
module
- The name of the module to include.
The
include
command replaces the currentinclude
statement with the contents of the specified file module.include
lets you write and maintain JPL in separate modules. You can thereby avoid hard-coding the same procedure across several modules, or allocating memory for public modules. The included module can itself contain its owninclude
statements. You can nestinclude
statements up to eight levels deep.Panther looks for
module
among available modules in this order:
- Memory-resident modules.
- Library module in an open library.
- The current directory.
- File module in a directory specified by sm_initcrt.
- File module in a directory specified by SMPATH.
At runtime, JPL compiles and loads the included module as needed. Compilation occurs before JPL executes the primary module or procedure that contains the
include
statement. Consequently, compilation errors in the included module prevent execution of the primary module.