INCLUDE


ANSI

 

The INCLUDE compiler directive (which may be abbreviated as INC) allows the user to include another text file within the program. INCLUDE files force standardization and increase programmer productivity. Any changes made to an INCLUDE would then be reflected in programs that incorporate it after they are compiled again. The instruction uses the format:

 

 

[label]

INCLUDE

{source}

 

Where:

label

Optional. A Program Execution Label.

source

Required. The name of the source file that is included in the program.

Flags Affected: NONE

Note the following:

  1. All lines within {source} are incorporated within the main program.

  2. The default extension on INCLUDE {source} files is .PLS, although another extension may be given.

  3. If a drive or subdirectory is not specified for the included file, the current working directory is searched, followed by the directory of the primary source file, and finally all Search Paths are searched in order.

  4. There is no limit to the number of INCLUDE files and they may be nested up to eight levels deep.

  5. Labels on the INCLUDE directive reference the first included line and should not be used within the User Data Area. Labels on the INCLUDE directive are considered Program Execution Labels even if used within the UDA.

  6. The INCLUDE identifiers to support both uppercase and lowercase alpha characters.

 

 

See Also: Example Code, Compiler Directives

 



PL/B Language Reference %IF LIKE