Please enable JavaScript to view this site.

ESL Documentation

The include statement inserts a specified ASCII text file, which contains ESL source code, into the current ESL program. The file is inserted at the time that the program is compiled. You can specify any number of include statements in an ESL program.

 

This feature is especially useful when you want to use the same sequence of statements in more than one program. For example, you might define a standard set of keys that are displayed in all of your programs. Instead of specifying identical statements in each of the programs, you can put the statements into a separate file, for example, one named KEYS.INC.

 

Then, at the appropriate line in each of your programs, you can specify:

 

        include "keys.inc"

 

ESL inserts all of the statements contained in the included file at the location at which the include statement is specified. After processing the last line of the inserted file, ESL continues to process the original file at the line following the include statement line.

 

The string literal that you specify in the include statement must be a valid filename for the operating system ESL is running on. Although the examples shown in this section use the extension .INC (for INClude), you can specify any other extension. If you have specified a value for INCTYPE in the EslConfig.ini file during configuration, it will be used when no extension is specified on the include command line.