DelphiBasics
$Include
Compiler Directive
Allows code in an include file to be incorporated into a Unit
  {$Include FileName}
Description
The $Include compiler directive includes code from an external file in line into the current Unit.
 
This is very useful for including compiler directives or common code into all of your units to ensure consistency, and a single point of control.
 
The default file name extension is .pas, so for .pas files, only the name is required. Use quotes if the name includes one or more spaces.
 
For example:
 
Common.pas file:
{$ReferenceInfo On}
{$RangeChecks On}
{$OverFlowChecks On}

Unit1.pas file:
...
{$Include Common}
...
Notes
$Include is equivalent to $I.

This directive can be used multiple times within your code.
Related commands
$I Allows code in an include file to be incorporated into a Unit
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 Download this web site as a Windows program.


 
Example code :

   
Delphi Programming Neil Moffatt 2002 - 2016. All rights reserved.  |  Home Page