#PreCompiled Preprocessor Directive

#PreCompiled:  BOOL

The #PreCompiled directive specifies whether a source file is precompiled.

If BOOL is TRUE, the source file is assumed to be precompiled. Otherwise, if the source file is referenced through an #Include directive, the file is included in-line.

The #PreCompiled directive must appear before any #Include directive within a GDL source file; otherwise, it is ignored. The BOOL value is required.

Files that are marked as precompiled will be parsed in a root context. That is, any context that is established by the host or including GDL files will be lost. For example, if the host GDL file defined preprocessor symbols before including the precompiled file, those symbols would not exist when the precompiled file is parsed. This type of parsing ensures that multiple versions of a precompiled file cannot be created by using #Ifdef blocks and having different hosts define different symbols to access the various #Ifdef blocks. Because the precompiled file is never reparsed, there will be only one unique version. Thus, the writer of a precompiled file must not rely on any externally defined preprocessor symbols.

Also note that precompiled files must be unique and they must be independent of the host that includes them. Precompiled files do not rely on any included content that the host file references or any content that might be defined in the host file.

This preprocessor directive is new for GDL.