Delphi版本号对照(条件编译中用到)

来源:互联网 发布:知行乐学 编辑:程序博客网 时间:2024/06/06 13:23

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 CommentsEdit

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:

CompilerCompilerVersion

Defined Symbol

Delphi 10.2 Tokyo32VER320Delphi 10.1 Berlin31VER310Delphi 10 Seattle30VER300Delphi XE829VER290Delphi XE728VER280Delphi XE627VER270AppMethod 126.5VER265Delphi XE526VER260Delphi XE425VER250Delphi XE324VER240Delphi XE223VER230Delphi XE22VER220Delphi 201021VER210Delphi 200920VER200Delphi 2007 .NET19VER190Delphi 200718.5VER185 (also VER180)Delphi 200618VER180Delphi 200517VER170Delphi 8 .NET16VER160Delphi 715VER150Delphi 614VER140Delphi 513(*)VER130Delphi 412(*)VER120Delphi 310(*)VER100Delphi 29(*)VER90Delphi 18(*)VER80

(*) These versions did not have a CompilerVersion constant, it was introduced with Delphi 6.


0 0
原创粉丝点击