Skip to content

The Rules of Precompiling

  • Forward references are allowed from the first program (or header) to the second. So, in the first, you could declare an object in the second program (or header) and access it in the first.

  • All symbols, variables, objects, and files are carried forward from the first program to the second, just as if the programs were compiled altogether.

  • The precompiled portion must compile without compile-time errors.

  • Command blocks and object definitions may not span the program files or header. In general, anything you begin in the first part must be completed in the first part.

  • The files .FLD, .PBG, and .PKD must be accessible to load the file. If the first part can't be found in these forms, a .PKG extension will be added, and the file of that name will be #INCLUDEd in the program being compiled (defeating the benefits of precompilation).

  • Only one use command may load a program in this way. Other use commands will #INCLUDE the file as source, recompiling it, regardless of whether the used files have been precompiled.

  • The use or #HEADER command must be the first line of the program (excluding comments). If you have both a use and #HEADER, the use command would go after the #HEADER.

See Also

Precompiling