RAD Studio (Common)
ContentsIndex
PreviousUpNext
Include file (Delphi)
Type  
Parameter  
Syntax  
{$I filename} {$INCLUDE filename}  
Scope  
Local  

Remarks 

The $I parameter directive instructs the compiler to include the named file in the compilation. In effect, the file is inserted in the compiled text right after the {$I filename} directive. The default extension for filename is .pas. If filename does not specify a directory path, then, in addition to searching for the file in the same directory as the current module, Delphi searches in the directories specified in the Search path input box on the Directories/Conditionals page of the Project|Options dialog box (or in the directories specified in a -I option on the dccil command line). 

To specify a filename that includes a space, surround the file name with single quotation marks: {$I 'My file'}. 

There is one restriction to the use of include files: An include file can't be specified in the middle of a statement part. In fact, all statements between the begin and end of a statement part must exist in the same source file.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!