#include files Foundation
Preprocessor directives can be created anywhere in the source code. They are used by the preprocessor from the point where they are defined and remain valid until the end of the source code file (exception: #define directives can be undefined using #undef). When directives are needed in more than one source code file, they can be contained in separate files. These separate files have the file extension "CH" by default. They are called #include files and can be inserted into a source code file using the directive #include (the default file extension for source code files is "PRG" and they are termed PRG files). As soon as the preprocessor encounters the directive#include in a file, it inserts the specified file at that location:
The file name of the #include file must always be specified in quotation marks in the #include directive. In the example, the preprocessor inserts the file APPEVENT.CH into the PRG file where the #includedirective is located, and all the directives from this CH file are then applied to the PRG file. Frequently used directives only need to be written once in a CH file and can then be used in any number of PRG files via #include.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.