The {$I filename} or {$INCLUDE filename} directive tells the compiler to read further statements from the file filename. The statements read there will be inserted as if they occurred in the current file.
The compiler will append the .pp extension to the file if no extension is given. Do not put the filename between quotes, as they will be regarded as part of the file’s name.
Include files can be nested, but not infinitely deep. The number of files is restricted to the number of file descriptors available to the Free Pascal compiler.
Contrary to Turbo Pascal, include files can cross blocks. I.e. a block can start in one file (with a Begin keyword) and can end in another (with a End keyword). The smallest entity in an include file must be a token, i.e. an identifier, keyword or operator.
The compiler will look for the file to include in the following places:
Directories can be added to the include file search path with the -Fi command line option.