(→Technical Comments: versions are incorrect - someone please fix it using the official info page) Tags: Visual edit apiedit |
(Undo revision 23055 by 91.239.32.0 (talk)) Tag: sourceedit |
||
Line 34: | Line 34: | ||
Defined Symbol |
Defined Symbol |
||
|- |
|- |
||
− | | Delphi 10.1 Berlin || |
+ | | Delphi 10.1 Berlin || 31 || VER310 |
|- |
|- |
||
− | | Delphi 10 Seattle || |
+ | | Delphi 10 Seattle || 30 || VER300 |
|- |
|- |
||
− | | Delphi XE8 || |
+ | | Delphi XE8 || 29 || VER290 |
|- |
|- |
||
− | | Delphi XE7 || |
+ | | Delphi XE7 || 28 || VER280 |
|- |
|- |
||
− | | Delphi XE6 || |
+ | | Delphi XE6 || 27 || VER270 |
|- |
|- |
||
− | | AppMethod 1 || || VER265 |
+ | | AppMethod 1 || 26.5 || VER265 |
|- |
|- |
||
− | | Delphi XE5 || || VER260 |
+ | | Delphi XE5 || 26 || VER260 |
|- |
|- |
||
− | | Delphi XE4 || || VER250 |
+ | | Delphi XE4 || 25 || VER250 |
|- |
|- |
||
− | | Delphi XE3 || || VER240 |
+ | | Delphi XE3 || 24 || VER240 |
|- |
|- |
||
− | | Delphi XE2 || || VER230 |
+ | | Delphi XE2 || 23 || VER230 |
|- |
|- |
||
− | | Delphi XE || || VER220 |
+ | | Delphi XE || 22 || VER220 |
|- |
|- |
||
− | | Delphi 2010 || || VER210 |
+ | | Delphi 2010 || 21 || VER210 |
|- |
|- |
||
− | | Delphi 2009 || || VER200 |
+ | | Delphi 2009 || 20 || VER200 |
|- |
|- |
||
− | | Delphi 2007 .NET || || VER190 |
+ | | Delphi 2007 .NET || 19 || VER190 |
|- |
|- |
||
− | | Delphi 2007 || || VER185 (also VER180) |
+ | | Delphi 2007 || 18.5 || VER185 (also VER180) |
|- |
|- |
||
− | | Delphi 2006 || || VER180 |
+ | | Delphi 2006 || 18 || VER180 |
|- |
|- |
||
− | | Delphi 2005 || || VER170 |
+ | | Delphi 2005 || 17 || VER170 |
|- |
|- |
||
− | | Delphi 8 .NET || || VER160 |
+ | | Delphi 8 .NET || 16 || VER160 |
|- |
|- |
||
− | | Delphi 7 || |
+ | | Delphi 7 || 15 || VER150 |
|- |
|- |
||
− | | Delphi 6 || |
+ | | Delphi 6 || 14 || VER140 |
|- |
|- |
||
− | | Delphi 5 || |
+ | | Delphi 5 || 13(*) || VER130 |
|- |
|- |
||
− | | Delphi 4 || |
+ | | Delphi 4 || 12(*) || VER120 |
|- |
|- |
||
− | | Delphi 3 || |
+ | | Delphi 3 || 10(*) || VER100 |
|- |
|- |
||
− | | Delphi 2 || |
+ | | Delphi 2 || 9(*) || VER90 |
|- |
|- |
||
− | | Delphi 1 || |
+ | | Delphi 1 || 8(*) || VER80 |
|} |
|} |
||
</div> |
</div> |
||
(*) These versions did not have a CompilerVersion constant, it was introduced with Delphi 6. |
(*) These versions did not have a CompilerVersion constant, it was introduced with Delphi 6. |
||
− | * The above table is incorrect and has been partially cleared, see official page: http://docwiki.embarcadero.com/RADStudio/Seattle/en/Compiler_Versions |
||
==Examples== |
==Examples== |
Revision as of 10:46, 8 March 2017
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 along with conditional expressions. 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 | CompilerVersion |
Defined Symbol |
---|---|---|
Delphi 10.1 Berlin | 31 | VER310 |
Delphi 10 Seattle | 30 | VER300 |
Delphi XE8 | 29 | VER290 |
Delphi XE7 | 28 | VER280 |
Delphi XE6 | 27 | VER270 |
AppMethod 1 | 26.5 | VER265 |
Delphi XE5 | 26 | VER260 |
Delphi XE4 | 25 | VER250 |
Delphi XE3 | 24 | VER240 |
Delphi XE2 | 23 | VER230 |
Delphi XE | 22 | VER220 |
Delphi 2010 | 21 | VER210 |
Delphi 2009 | 20 | VER200 |
Delphi 2007 .NET | 19 | VER190 |
Delphi 2007 | 18.5 | VER185 (also VER180) |
Delphi 2006 | 18 | VER180 |
Delphi 2005 | 17 | VER170 |
Delphi 8 .NET | 16 | VER160 |
Delphi 7 | 15 | VER150 |
Delphi 6 | 14 | VER140 |
Delphi 5 | 13(*) | VER130 |
Delphi 4 | 12(*) | VER120 |
Delphi 3 | 10(*) | VER100 |
Delphi 2 | 9(*) | VER90 |
Delphi 1 | 8(*) | VER80 |
(*) These versions did not have a CompilerVersion constant, it was introduced with Delphi 6.
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
Added Delphi 2007.NET by Jaro.Benes
Added Delphi XE3 by Jaro.Benes