Line 55: | Line 55: | ||
</div> |
</div> |
||
− | <!-- Please keep the category list at the bottom for consistency. --> Added D2010, Uffe Kousgaard |
+ | <!-- Please keep the category list at the bottom for consistency. --> Added D2010, Uffe Kousgaard<br />Added Delphi XE, Steven Kamradt |
− | |||
− | Added Delphi XE, Steven Kamradt |
||
[[Category:VCL]] |
[[Category:VCL]] |
||
[[Category:System Unit]] |
[[Category:System Unit]] |
Revision as of 22:07, 6 October 2010
Unit
Description
The CompilerVersion constant identifies the internal version number of the Delphi compiler. It is defined in the System unit and may be referenced either in code just as any other constant:
if CompilerVersion = 20 then sCompilerName := 'Delphi 2009';
or in conditional compiler expressions:
{$if CompilerVersion > 18} // Delphi 2007 or later {$ifend}
Technical Comments
The CompilerVersion constant was introduced in Delphi 6. In earlier Delphi versions various compiler defined VERxxx symbols are used to determine compiler versions.
CompilerVersion values and the equivalent compiler defined symbols for the Delphi versions in which the CompilerVersion constant is defined are:
Compiler Version Compiler Defined Symbol Delphi XE 22 VER220 Delphi 2010 21 VER210 Delphi 2009 20 VER200 Delphi 2007 18.5 VER185 Delphi 2006 18 VER180 Delphi 2005 17 VER170 Delphi 8 16 VER160 Delphi 7 15 VER150 Delphi 6 14 VER140
Examples
(Please provide links to articles/source code that show how to use this item.)
See Also
User Comments/Tips
(Please leave your name with your comment.)
Added D2010, Uffe Kousgaard
Added Delphi XE, Steven Kamradt