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}
...
|