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

The CompilerVersion constant identifies the internal version number of the Delphi compiler.的更多相关文章

  1. Delphi CompilerVersion Constant / Compiler Conditional Defines

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

  2. 当前项目与当前环境的JDK版本不匹配”Bad version number in .class file“

    java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.d ...

  3. 解决golang windows调试问题:Could not determine version number: could not find symbol value for runtime.buildVersion

    版本信息: go:1.8.3 windows: win7/64 idea-go-plugin:171.4694.61 在windows下,使用dlv进行调试的时候,如果golang程序引入了c模块,比 ...

  4. UnsupportedClassVersionError: Bad version number in .class file

    java.lang.UnsupportedClassVersionError: Bad version number in .class file造成这种过错是ni的支撑Tomcat运行的JDK版本与 ...

  5. java.lang.UnsupportedClassVersionError: Bad version number in .class file异常

    java.lang.UnsupportedClassVersionError: Bad version number in .class file异常 部署工程时也出现过因为版本不同引起的问题,那时我 ...

  6. Bad version number in .class file

    TY项目是用JDK1.6做的,早先在电脑上装了一个1.5的,这回就不能用了.为了能用,我就又装了一个1.6的,修改了环境变量之后,以为一切OK.开始测试,首先在Myeclipse中打开我用1.5编的一 ...

  7. oracle.jbo.JboException: JBO-29000: JBO-29000: Bad version number in .class file

    我在本地run Page的时候报以下错误. oracle.jbo.JboException: JBO-29000: JBO-29000: Bad version number in .class fi ...

  8. Java Bad version number in .class file

    错误信息: java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLo ...

  9. Java 异常 —— Bad version number in .class file

    把一个项目拷贝到另一个环境,运行时报错: Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class ...

随机推荐

  1. [wikioi2144]砝码称重2(另类的dfs)

    题目描述 Description 有n个砝码,现在要称一个质量为m的物体,请问最少需要挑出几个砝码来称? 注意一个砝码最多只能挑一次 输入描述 Input Description 第一行两个整数n和m ...

  2. 《TCP/IP详解卷1:协议》第11章 UDP:用户数据报协议-读书笔记

    章节回顾: <TCP/IP详解卷1:协议>第1章 概述-读书笔记 <TCP/IP详解卷1:协议>第2章 链路层-读书笔记 <TCP/IP详解卷1:协议>第3章 IP ...

  3. Webbench网站压力测试

      Webbench是有名的网站压力测试工具,能测试处在相同硬件上,不同服务的性能以及不同硬件上同一个服务的运行状况.webBech的标准测试可以向我们展示服务器的 两项 内容:每秒钟相应请求数和每秒 ...

  4. 分布式Web服务器架构

    最开始,由于某些想法,于是在互联网上搭建了一个网站,这个时候甚至有可能主机都是租借的,但由于这篇文章我们只关注架构的演变历程,因此就假设这个时候已经是托管了一台主机,并且有一定的带宽了,这个时候由于网 ...

  5. 过滤器-->GZIP压缩

    1.创建一个 可以使用GZIPOutputStream 压缩的流 package com.zh.yasuo2; import java.io.IOException; import java.util ...

  6. MVC2 Area实现网站多级目录

    Areas是ASP.NET Mvc 2.0版本中引入的众多新特性之一,它可以帮你把一个较大型的Web项目分成若干组成部分,即Area.实现Area的功能可以有两个组织形式: 在1个ASP.NET Mv ...

  7. 另一套Oracle SQL练习题,更新参考答案

    题干: create table student( sno ) primary key, sname ), sage ), ssex ) ); create table teacher( tno ) ...

  8. hdu2072 字典树

    这题印象深刻,我刚接触acm时,以为这题是水题(因为是中文,又短),一直没做出.现再想想也是.可能也是我以前字符串掌握不好: 这题其实也可以用stl里的map写.这里我用字典树写的.其实这题算简单题了 ...

  9. 腾讯云CentOS7安装LNMP+wordpress

    许多云主机都有学生优惠,于是我趁着现在大一买了个腾讯1元云主机+免费cn域名(高中生的话就别想了).鉴于我只知道用服务器安装博客,别的用途不了解,所以我就去安装wordpress. 而由于我看的教程有 ...

  10. TCP/IP Four Layer Protocol Format Learning

    相关学习资料 tcp-ip详解卷1:协议.pdf 目录 . 引言 . 应用层 . 传输层 . 网络层 0. 引言 协议中的网络字节序问题 在学习协议格式之前,有一点必须明白,否则我们在观察抓包数据的时 ...