加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

列出了Delphi语言的特性和版本,它们被引入/弃用

发布时间:2020-12-15 05:26:44 所属栏目:大数据 来源:网络整理
导读:在我开始之前,我想指出,我通过Google反复和真诚地搜索这样的东西,并没有找到一个。 我需要(对于我正在开发的项目)所有Delphi的列表(2007年到最新发布的版本,我不再支持任何2007年以前的版本)“语言特性”,以及它们被引入的版本和(如果适用)不赞成,改进
在我开始之前,我想指出,我通过Google反复和真诚地搜索这样的东西,并没有找到一个。

我需要(对于我正在开发的项目)所有Delphi的列表(2007年到最新发布的版本,我不再支持任何2007年以前的版本)“语言特性”,以及它们被引入的版本和(如果适用)不赞成,改进或删除。

我在Stack Overflow上注意到类似的问题,虽然大多数是以“哪个特性是最好的”的形式表达的,并且被认为不合适。

如果任何人知道这样的列表(或有足够的空闲时间编译一个),我将非常感谢。

接受的答案将包含指向此列表的链接,或列表本身。

解决方法

请注意,此答案仅列出新的语言功能

以下是RAD Studio docwiki的链接:
– What’s new in Delphi and C++Builder 10.1 Berlin
– What’s new in Delphi and C++Builder 10 Seattle
– What’s new in Delphi and C++Builder XE8
– What’s New in Delphi and C++Builder XE7
– What’s New in Delphi and C++Builder XE6
– What’s New in Delphi and C++Builder XE5
– What’s New in Delphi and C++Builder XE4
– What’s New in Delphi and C++Builder XE3
– What’s New in Delphi and C++Builder XE2
– What’s New in Delphi and C++Builder XE
– What’s New in Delphi and C++Builder 2010
– What’s New in Delphi and C++Builder 2009
– What’s New in RAD Studio (Delphi for Win32 2007)
– What’s New in RAD Studio (C++Builder 2007)
– What’s New in Delphi 2006
– What’s New in Delphi 2005
– What’s New in Delphi 7
– What’s New in Delphi 6
– What’s New in Delphi 5
– What’s New in Delphi 4
– What’s New in Delphi 3
– What’s New in Delphi 2
– Delphi 1 Features

Embarcadero的完整列表:What’s New
参见:David I’s list

总结:

Delphi 10.3 (codename Carnival) (to be confirmed)

>支持OSX 64位
>可空类型

Delphi 10.2 Tokyo (codename Godzilla) (to be confirmed)

>支持Linux服务器应用程序(使用LLVM的Intel 64位)。

Delphi 10.1 Berlin

>对所有平台上的Utf8String和RawByteString类型的本机支持
>所有编译器都支持[weak],[unsafe] and [volatile] attributes。
> The size of extended on OSX is now 16 bytes.
> class and record helpers cannot access private members of the classes or records they extend。
>支持Android到6.01。

Delphi 10 Seattle

>支持Android 5.1.1和iOS 8.4
>改进的OSX异常处理

Delphi XE8

>支持64位iOS;
>新的整数类型:FixedInt,FixedUInt所有平台上的32位整数类型;
>新平台相关整数类型:LongInt,LongWord(在iOS-64上为64位,在所有其他平台上为32位);
> Fully qualified names must now include the unit scope name

Delphi XE7

> String-Like Operations Supported on Dynamic Arrays
> Parallel Library added to the RTL
> New compiler intrinsic routines (undocumented):

function IsManagedType(T:TypeIdentifier):Boolean;
函数HasWeakRef(T:TypeIdentifier):Boolean;
函数GetTypeKind(T:TypeIdentifier):TTypeKind;
function IsConstValue(Value):boolean;

Delphi XE6

Delphi XE5

> Android支持;
需要配备ArmV6 Neon或ArmV7的设备进行部署
介绍conditional define ANDROID
> Operator overloading for classes (but only for the NextGen compiler {Android/iOS})

Delphi XE4

>在XE4中引入/启用了以下新的条件:
AUTOREFCOUNT
CPUARM
EXTERNAL_LINKER
IOS
下一代
UNDERSCOREIMPORTNAME
WEAKREF
WEAKINSTREF
WEAKINTREF

>重新引入对iOS的支持。
> ARC support在NextGen编译器(包括TObject.DisposeOf)。
Note that much of the groundwork for ARC was already in XE3,but much of it was disabled
> Before the XE4 release,$IF statements could only be terminated with $IFEND,$ IFDEF,$ IFNDEF,$ IFOPT指令只能以$ ENDIF结束。

在XE4,这改变了,所以$ ENDIF成为$ IF,$ IFDEF,$ IFNDEF和$ IFOPT的接受终止符。

Delphi XE3

> Record helpers for built-in types
>删除了对iOS的支持。
>原子本征函数:
AtomicExchange()AtomicIncrement()AtomicCmpExchange()AtomicDecrement()
>介绍[ref] attribute。

Delphi XE2

> Mac OSX(32位)和iOS的跨平台支持;
>支持Win64;
>修改RTL以支持跨平台;
> Packed Now Forces Byte Alignment of Records(Pre XE2它没有必要这样做)
>添加了八个新DEFINE:

ALIGN_STACK
CPUX86
CPUX64
MACOS(Mac操作系统)
MACOS32
PC_MAPPED_EXCEPTIONS
PIC
WIN64
> Full unit scope names are now required in your uses clause.
>内置类型因目标平台(32/64位)而异,

>扩展数据类型在Win32上为10字节,但在Win64上为8(!)字节

Delphi XE

>在XE中忽略{$ STRINGCHECKS}编译器指令;
> {$ ALIGN}指令的新的16字节值:
{$ ALIGN}指令的可接受值现在包括1,2,4,8和16。
> new {$ CODEALIGN}指令,这将设置过程或函数的起始地址。
> {$ STRONGLINKTYPES ON}指令
>支持正则表达式。

Delphi 2010

>增强的Delphi RTTI(运行时类型信息)。
> Attributes
> as操作符可以用于将接口引用转发回提取它的对象。
> is运算符可用于验证是否从某个类提取了接口引用。
>正常不安全的转换可以在一个接口上执行:TObject(SomeInterface)。
> new delayed directive指示不会在声明时加载外部库(如DLL),而是等待第一次调用该方法
> Class Constructor/Destructor

Delphi 2009

>内在类型字符串现在映射到UnicodeString;
> Generics;
> function Default(T): T intrinsic function (Undocumented)
> Smart pointers;
> Anonymous methods;
> Support for nested exceptions and exception tracing;
>支持pointermath和一个新的编译指令:{$ POINTERMATH ON | OFF};
>四个新的编译器警告:

> W1057从“%s”到“%s”的隐式字符串,
> W1058隐式字符串转换,可能从“%s”到“%s”丢失数据,
> W1059从“%s”到“%s”的显式字符串,
> W1060显式字符串转换,从“%s”到“%s”有潜在的数据丢失;

> Exit函数可以接受指定结果的参数;
>作为Widestrings的resourcestrings;
> TObject有一个extra hidden pointer to TMonitor除了它的VMT指针;
>已弃用的关键字现在可以有其他文本

Delphi 2007

>没有我知道的语言变化;
注意Delphi 2007是一个不间断的版本,DCU从D2006将在D2007中不变;
>(2007年的.NET’personality’introduced generics)

Delphi 2006

> Enhanced records;
> operator overloading;
>静态方法和属性;
> class helpers;
> FastMM是默认的内存管理器;
> strict private/protected visibility keyword;
> final关键字的虚拟方法;
> {$ METHODINFO}指令;

Delphi 2005

> for … in loops,
> inline关键字
>在使用语句中允许使用通配符
>嵌套类型
>嵌套常量
> {$ REGION} / {$ ENDREGION}指令

Delphi 7

>三个额外的编译器警告:

> Unsafe_Type,
> Unsafe_Code,and
> Unsafe_Cast。这些警告默认情况下处于禁用状态,但可以启用

> new compiler directive {$WARN UNSAFE_CODE ON}
>使用TFormatSettings结构格式化和解析数字,日期时间值和货币的例程的重载。

Delphi 6

> [TCustomVariantType] [68]提供operator overloading for custom variant types
>新编译指令:

> {$ IFDEF MSWINDOWS}
> {$ IFDEF LINUX}
> {$LIBPREFIX}
> {$LIBSUFFIX}
> {$LIBVERSION}
> {$MESSAGE 'message'}
> {$ SetPEFlags}

>支持{$ IF} {$ ELSE}编译器指令
> Compiler hinting directives: experimental,deprecated,library,platform(但不包含已弃用的其他文字)
> Variant不再基于COM,而是更改为CLX兼容,基于COM的变式重命名为OLEVariant
> Typed constants cannot be assigned to (Override with {$J+})
>枚举类型可以分配一个显式值(cf C);
>接口属性
>支持调用varargs外部函数(但仅用于cdecl调用约定)
>自定义变体

Delphi 5

没有新的语言功能,但:

> Support added for Frames

Delphi 4

> Dynamic arrays
> LongWord和Int64; Cardinal是一个UINT32(在它是无符号的31位值之前)
> Real需要8个字节,与double相同(以前为6个字节);

>使用新的{$ REALCOMPATIBILITY ON}编译器指令覆盖;
> REAL48替换旧的6字节实数;

>支持资源
> Method overloading
> Default parameters
> {$ EXTERNALSYM}和{$ NODEFINE}指令
> implements keyword属性

Delphi 3

> Wordbool,longbool和bytebool存储false为-1而不是1(布尔值不变)
>组件必须使用软件包安装。
>断言。
>输出参数。
> Widestring
> interface和dispinterface关键字和COM(dispid)支持。

Delphi 2

>支持32位;
> Ansistring将shortstring替换为默认字符串类型
>货币
> Variant(用于与OLE自动化互操作)。
>线程支持和ThreadVar关键字。> 4字节数据是4字节对齐的新打包关键字覆盖此行为;> TDateTime从1899/12/30开始,在D1开始于0000/00/00> new finalization关键字>添加register和stdcall调用约定。> packed关键字。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读