next up previous contents
Next: 3.1.6 Dynamic Loading of Up: 3.1 Basic Facilities Previous: 3.1.4 Environment Variables


3.1.5 Include Files

MDL files can be split into several convenient parts and combined as needed by using #include statements. An #include statement causes the MDL interpreter to insert the contents of the requested file.

#include "filename"

To support structured libraries of MDL #include files the environment variable VMODELPATH can be used. It determines a list of directories where the MDL interpreter searches for files to be included. The following strategy is followed:

The syntax for path strings and path delimiters in the environment string follows the common rules for such constructs on the actual operating system in use. Example 3.4 gives an example for the usage of environment variables supporting the lookup of #include files on Unix compatible Systems. The analogous Windows-NT compatible syntax is demonstrated in Example 3.5.

\includegraphics[width=0.6cm]{figures/exaLeft.eps}

set $VMODELPATH   = "$VPROJECT/promisnt/mdl:$VROOT/mdl";
#include "basics.mdl"
#include "$VPROJECT/promisnt/exa/test.mdl"

Example 3.4: Include statements for Unix compatible systems

\includegraphics[width=0.6cm]{figures/exaLeft.eps}

set $VMODELPATH   = "$VPROJECT \ensuremath{\mathtt{\backslash}}promisnt \ensuremath{\mathtt{\backslash}}mdl:$VROOT \ensuremath{\mathtt{\backslash}}mdl";
#include "basics.mdl"
#include "$VPROJECT \ensuremath{\mathtt{\backslash}}promisnt \ensuremath{\mathtt{\backslash}}exa \ensuremath{\mathtt{\backslash}}test.mdl"

Example 3.5: Include statements for Windows-NT compatible systems

Directories stated in VMODELPATH which do not exist are silently ignored.


next up previous contents
Next: 3.1.6 Dynamic Loading of Up: 3.1 Basic Facilities Previous: 3.1.4 Environment Variables
Robert Mlekus
1999-11-14