%Include directive (LotusScript® Language)
At compile time, inserts the contents of a text file into the module where the directive appears.
Syntax
%Include fileName
Elements
fileName
A string literal whose value is a file name; you can optionally include a path.
If you omit the file name extension, LotusScript® assumes .lss. To include a file that has no extension, include a period at the end of the file name. For example:
%Include "orfile."
This prevents LotusScript® from adding the .lss extension to the file name.
Usage
The %Include directive must be the only item on a line, except for an optional trailing comment. It must be followed by white space (a space character, a tab character, or a newline character).
%Include statement |
Path type |
LotusScript® looks for this file: |
---|---|---|
%Include "myfile.lss" |
relative path, no directory |
<program dir>\myfile.lss |
%Include "include\myfile.lss" |
relative path, with directory |
<program dir>\include\myfile.lss |
%Include "c:\include\myfile.lss" |
absolute path |
c:\include\myfile.lss |
An included file can itself contain %Include directives. You can nest up to 16 files.
At compile time, LotusScript® replaces the %Include directive with the entire contents of the named file. They are then compiled as part of the current script.
If a run-time or compile-time error occurs in a statement in an included file, the line number reported is that of the %Include directive.
The file you include must be a text file containing only LotusScript® statements. If anything in the included file cannot be compiled, LotusScript® generates a compiler error.
If the file is not found, LotusScript® generates an error.