http://delphi.wikia.com/wiki/CompilerVersion_Constant

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}

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

http://delphi.wikia.com/wiki/Borland_Compiler_Conditional_Defines

Product Name Version

Conditional Define

CompilerVersion
Embarcadero RAD Studio XE5 19.0 VER260 26
Embarcadero RAD Studio XE4 18.0 VER250 25
Embarcadero RAD Studio XE3 17.0 VER240 24
Embarcadero RAD Studio XE2 16.0 VER230 23
Embarcadero RAD Studio XE 15.0 VER220 22
Embarcadero RAD Studio 2010 14.0 VER210 21
CodeGear C++ Builder 2009 12.0 VER200 20
CodeGear Delphi 2007 for .NET 11.0 VER190 19?
CodeGear Delphi 2007 for Win32 11.0 VER180 and VER185 18, 18.5
Borland Developer Studio 2006 10.0 VER180 18
Borland Delphi 2005 9.0 VER170 17
Borland Delphi 8 for .NET 8.0 VER160 * 16
C++BuilderX  ?  ?  
Borland C#Builder 1.0 VER160 *  
Borland Delphi 7 7.0 VER150 15
Borland Kylix 3 3.0 VER140 **  
Borland C++Builder 6  ? VER140 **(!!)  
Borland Kylix 2 2.0 VER140 **  
Borland Delphi 6 6.0 VER140 ** 14
Borland Kylix 1.0 VER140 **  
Borland C++Builder 5  ? VER130 ***  
Borland Delphi 5 5.0 VER130 ***  
Borland C++Builder 4  ? VER125  
Borland Delphi 4 4.0 VER120  
Borland C++Builder 3  ? VER110 ****  
Borland Delphi 3 3.0 VER100  
Borland C++ 5  ?  ?  
Borland C++Builder 1  ? VER93  
Borland Delphi 2 2.0 VER90  
Borland C++ 4.5  ?  ?  
Borland Delphi 1.0 VER80  
Borland C++ 4  ?  ?  
Borland Pascal 7 7.0 VER70  
Borland C++ 3.1  ?  ?  
Turbo Pascal for Windows 1.5 1.5 VER70  
Turbo C++ for DOS 3  ?  ?  
Borland C++ 3  ?  ?  
Turbo C++ for Windows 3 (Win16)  ?  ?  
Turbo Pascal for Windows 1.0 1.0  ???  
Borland C++ 2  ?  ?  
Turbo Pascal 6 6.0 VER60  
Turbo C++ for DOS  ?  ?  
Turbo C for DOS 2  ?  ?  
Turbo Pascal 5.5 5.5 VER55  
Turbo C for DOS 1.5  ?  ?  
Turbo Pascal 5 5.0 VER50  
Turbo Pascal 4 4.0 VER40  
Turbo C for DOS  ?  ?  
Turbo Pascal 3 3.0  ???  
Turbo Pascal 2 2.0  ???  
Turbo Pascal 1 1.0  ???

* This conditional define is shared by the Delphi compilers used to build C#Builder 1 and Delphi 8, which do not natively support Delphi for Win32.

This define is used in the "IDE Integration Packs" that were released to Borland partners in order to allow IDE plugins like ModelMaker Code Explorer

(http://www.modelmakertools.com/code-explorer/index.html) and

Castalia (http://www.delphi-expert.com/castalia3) to be compiled.

** This conditional define is shared between C++Builder 6, Delphi 6, Kylix 1, 2, and 3

(Checking for the conditional define "LINUX" helps to determine whether the compiler is Kylix or Delphi and "BCB" can be used to determine if C++Builder is being used).

*** This conditional define is shared with C++Builder 5

**** C++Builder 3.0 used VER110 (it had its own version of the Delphi compiler included).

**** CompilerVersion (Delphi 6 or later) can be used with conditional directives like

{$IF CompilerVersion >= 20}  {$DEFINE CanUnicode}  {$IFEND}

or using code:

if System.CompilerVersion >= 22 then  <do something>;

Delphi CompilerVersion Constant / Compiler Conditional Defines的更多相关文章

  1. The CompilerVersion constant identifies the internal version number of the Delphi compiler.

    http://delphi.wikia.com/wiki/CompilerVersion_Constant The CompilerVersion constant identifies the in ...

  2. Delphi For Linux Compiler

    Embarcadero is about to release a new Delphi compiler for the Linux platform. Here are some of the k ...

  3. Delphi 版本号(D1到XE6),发现一个delphi.wikia.com网站

    Borland Compiler Conditional Defines  Edit  Talk1 2,909PAGES ONTHIS WIKI   Product Name Version Cond ...

  4. Delphi 项目配置选项

    打开项目设置窗口: 通过菜单:项目>选项 快捷键    :Shift+Ctrl+F11 Delphi编译器选项说明  Conditional defines 指定条件编译器指令中引用的符号. O ...

  5. 最新的Delphi版本号对照

    The CompilerVersion constant identifies the internal version number of the Delphi compiler. It is de ...

  6. Delphi的命令行编译命令

    Borland出品的Delphi,有着闪电般的编译速度,但是在界面控件使用较多.工程项目较大的时候,编译一个工程仍需要一段时间,打开庞大的Delphi IDE,也需要时间.其实,在一个工程开发结束,调 ...

  7. [Delphi] Delphi版本号对照

    VER300    Delphi Seattle / C++Builder Seattle    23    230    (Delphi:Win32/Win64/OSX/iOS32/iOS64/An ...

  8. Delphi 项目 结构 文件夹 组织

    Delphi Project Structure Folder Organization http://delphi.about.com/od/delphitips2008/qt/project_la ...

  9. [Delphi]编译条件

    当软件在多个DELPHI版本下编译时,需要处理各版本的不同情况,使用编译条件技术实现. 万一博客,编译指令基础使用介绍:http://www.cnblogs.com/del/category/1686 ...

随机推荐

  1. WPF拖动DataGrid滚动条时内容混乱的解决方法

    WPF拖动DataGrid滚动条时内容混乱的解决方法 在WPF中,如果DataGrid里使用了模板列,当拖动滚动条时,往往会出现列表内容显示混乱的情况.解决方法就是在Binding的时候给Update ...

  2. 头像截图上传三种方式之一(一个简单易用的flash插件)(asp.net版本)

    flash中有版权声明,不适合商业开发.这是官网地址:http://www.hdfu.net/ 本文参考了http://blog.csdn.net/yafei450225664/article/det ...

  3. oracle中的符号含义

    1.Oracle数据库存储过程中:=是什么意思?答:赋值的意思.举例:str := 'abcd';将字符串abcd赋值给变量str. 2.oracle 存储过程中的 := 和=有什么区别?答::= 是 ...

  4. 4、GitLab 创建、删除、修改项目

    一.gitLab创建项目 1.创建用户组 2.填写组信息后单击“Create group” 其中:“Group path”将显示在git路径中 3.选择需要加入该组的“用户”和“角色”后点击“Add ...

  5. mongodb与mysql传统的关系数据库区别

    转自:易百教程 MongoDB中的数据具有灵活的模式.文档在同一集合,但它们不需要具有相同的字段或结构集合,集合文档中的公共字段可以包含不同类型的数据. MongoDB中的数据具有灵活的模式.与SQL ...

  6. [重磅]Deep Forest,非神经网络的深度模型,周志华老师最新之作,三十分钟理解!

    欢迎转载,转载请注明:本文出自Bin的专栏blog.csdn.net/xbinworld. 技术交流QQ群:433250724,欢迎对算法.技术感兴趣的同学加入. 深度学习最大的贡献,个人认为就是表征 ...

  7. js监测设备类型【安卓,ios,苹果微信,电脑pc】

    话不多说上代码: 1.判断是不是微信 function is_weixn(){ var ua = navigator.userAgent.toLowerCase(); if(ua.match(/Mic ...

  8. 在LoadRunner中从数组类型的参数随机取值的方法

    在LoadRunner中从数组类型的参数随机取值的方法 使用web_reg_save_param做关联后,有时候会有多个匹配值. 为了模仿用户行为随机取一个值为后续transcation所用,可以使用 ...

  9. Codeforces Round #496 (Div. 3) F - Berland and the Shortest Paths

    F - Berland and the Shortest Paths 思路:还是很好想的,处理出来最短路径图,然后搜k个就好啦. #include<bits/stdc++.h> #defi ...

  10. 微软企业库5.0 学习之路——扩展学习篇、库中的依赖关系注入(重构 Microsoft Enterprise Library)[转]

    这篇文章是我在patterns & practices看到的一篇有关EntLib5.0的文章,主要介绍了EntLib5.0的这次的架构变化由来,觉得很不错,大家可以看一下! 在过去几年中,依赖 ...