Previous: Variables, Up: Reference for Common Language Elements [Contents]

### 8.13 File Inclusion

It is possible to include the text of another file in the current chart, similar to how it works in the C preprocessor. Use the `include` command followed by a filename in quotation marks. Currently the file is searched only in the directory of the file containing the `include` command. You can use relative or absolute paths to include files from other directories.

On Windows, you can use both forward and backward slashes to separate directories, but due to text escape sequences you need to double backslahes. Thus on Windows both are valid syntax:

    include "../file.signalling";
    include "..\\file.signalling";

You can include other files from included files, in arbitrary depth.

When you issue an `include` command, parsing continues in the specified file and returns to the original one - just after the include command. Certain errors (such as opening braces without closing pairs) may cause errors in the original file - try including only totally correct files.

Note that Color Syntax Highlighting does not parse include files. Any styles, colors or procedures defined there may be marked as undefined in the original file.

Note that if you want to define a set of procedures, designs or shapes you frequently use, in the Windows GUI it is better to place them in a design library (Design Library) as opposed to including them at the beginning of your file. Design libraries are pre-parsed when the GUI starts up and are not re-parsed again at compilation. In addition any styles or designs defined in them are taken into account by Color Syntax Highlighting.

Previous: Variables, Up: Reference for Common Language Elements [Contents]