Updated May 2022
++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.
While the ++INCLUDE feature has been part of A-BASIC since the earliest days, A-Shell adds a number of enhancements. See the following topics, as well as the documentation on COMPIL/LI (Local Include).
History
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.