LOTUSSCRIPT LANGUAGE


%Include directive
Example

At compile time, inserts the contents of a text file into the module where the directive appears.

Syntax

%Include fileName

Elements

fileName


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).

If you don't specify a path for the included file, the search path depends on the specific Lotus software application you're using. For example, if you are using Lotus Notes, the default directory is the Notes program directory. This is true also if only a partial directory is given. The following table demonstrates the possible search path options depending on what it is entered for fileName.
%Include statementPath typeLotusScript 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 pathc:\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.

Note EBCDIC platforms may exhibit backwards incompatibility starting with LotusScript Release 5 (Notes/Domino Release 6). Earlier releases interpret an included file as LMBCS (which is the same as ASCII in the single-byte range). Ongoing releases interpret an included file using the platform-native character set. On EBCDIC platforms, included text must be EBCDIC. In particular, if you have shipped ASCII-encoded LotusScript source files without text translation (binary FTP, for example), the files must be translated on EBCDIC platforms prior to inclusion.

Example
See Also