Please enable JavaScript to view this site.

Updated June 2023; see History

++INCLUDE <fspec>

++INCLUDE'ONCE <fspec>

++INCLUDE'IF'EXISTS <fspec>

++INCLUDE'ONCE'IF'EXISTS <fspec>

The ++INCLUDE compiler directives cause the file specified by fspec to be processed as if it were part of the file being compiled. The technique is useful for sharing common code, map statements, and definitions between programs. The fspec may be in either AMOS or native format. If no explicit location specified the file is expected to be in the current directory, or in the BAS: account. If not found in either location, the A-Shell compiler—unlike the AMOS counterpart—will also search in the same directory as the main source file being compiled, assuming that is different from the current directory.

All variations of ++INCLUDE also support a "transclude" mechanism via two optional parameters which are omitted from the syntax shown above. See the subtopics listed below for details on this and other ASB extensions to the standard include operation.

See Also

COMPIL/LI (Local Include)

History

2023 June, A-Shell 6.5.1732:  Transclude function added.

2017 March, A-Shell 6.4.1546, compiler enhancement (797): maximum nesting levels for ++INCLUDE and ++IF conditions increased from 20 to 40. Improve messaging/recovery for the overflow condition.

2013 July, A-Shell 6.1.1358:  Compiler enhancement (642): new variations of ++INCLUDE: ++INCLUDE'IF'EXISTS <filespec> and ++INCLUDE'ONCE'IF'EXISTS <filespec>. As the name implies, these operate just like ++INCLUDE and ++INCLUDE'ONCE except that if the file is not found in the normal search path, it is just skipped.

Subtopics

Nested ++INCLUDEs

One Time ++INCLUDEs

Transclude

Created with Help+Manual 9 and styled with Premium Pack Version 5 © by EC Software