A.6.2 Including Files

Default values should be stored in separate files called default files. Default files should not be edited by the user.

With the #include command a file is inserted at that position. This command allows including of files like its counterpart in the C programming language. The file name must be enclosed in double quotes, for example:

#include "~/work/defaults.ipd"

In this example, a file named defaults.ipd is loaded which is located in the directory ~/work. Including of files within a section is prohibited, e.g.,

#include "~/work/defaults.ipd"   // Include the file "defaults.ipd".
{  #include "~/work/section.ipd" // Error! Cannot include a file here.
#include "~/work/mydefs.ipd"     // Include the file "mydefs.ipd".

Moreover, a file can be included using the default path of the application by enclosing the filename in angle brackets.

// Find the file "defaults.ipd" using the include paths of MINIMOS-NT:
#include <defaults.ipd>

It is recommended in every input file to describe the purpose of the sections it contains at the top. Furthermore, in user-defined files the #include command should only be used at the top to avoid errors. A typical input file header is:

// ============================
//  My private input file
//  ...

#include <defaults.ipd>

Robert Klima 2003-02-06