Directive #include Foundation
Inserts the contents of an Include file into a source code file
The #include directive causes the preprocessor to insert the contents of the indicated file into the source code file. Files that are inserted into the source code by the preprocessor are called Include files and should contain only Directives or REQUEST declarations. The contents of an Include file is inserted at the location of the #include directive. The default file extension for include files is ".CH". All Xbase++ Include files are located in the ..\INCLUDE directory.
#include directives are generally placed at the beginning of a source code file. Include files solve a fundamental problem with directives. Directives are scoped to the source file in which they are defined. This means that if the same directive is used in several source files, it must be defined in each file. The Include file provides a method to define directives in one file, and then just #include that file in each source file requiring one or more directives contained in that file. By their nature, Include files also promote better modularity, since maintenance of the various directives can be performed in one location.
The Include file "STD.CH" is automatically inserted into each PRG file by the preprocessor, without requiring a corresponding #include directive. The file "STD.CH" contains the directives for the translation of all Xbase++ commands. Instead of "STD.CH", another file can be used as the automatic Include file by using the /U compiler switch. The original "STD.CH" file should not be changed, though. If changes are desired, a copy of "STD.CH" should be made and that new copy should be incorporated using the /U compiler switch.
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.