在开始之前,我想指出的是,我已经通过Google进行了一次诚实而真实的搜索,涉及范围很广,无法找到。
我需要(对于我正在开发的项目)所有Delphi(从2007年到最新发布的版本,我不再支持任何早于2007年的版本)“语言功能”的列表,以及引入这些功能的版本和( (如果适用)不推荐使用,改进或删除。
我之前在Stack Overflow上已经注意到了与此类似的问题,尽管大多数问题都是以“哪个功能最好”的形式表述的,并被认为不合适。
如果有人知道这样的列表(或有足够的空闲时间来编写一个列表),我将不胜感激。
接受的答案将包含指向此类列表的链接,或者包含列表本身。
最佳答案
请注意,此答案仅列出了新的语言功能
而不是 VCL / FMX新功能。
以下是RAD Studio docwiki的链接:
来自Embarcadero的完整列表:What's New
另请参阅:David I's list
总结一下:
Delphi 10.3.x,10.4 (尚未发布,这是推测性的)
Delphi 10.3
Delphi 10.2 Tokyo
@
operator is only allowed when hard-casting the array. Delphi 10.1 Berlin
[weak]
, [unsafe]
and [volatile]
attributes。 Delphi 10 Seattle
Delphi XE8
Delphi XE7
function IsManagedType(T: TypeIdentifier): Boolean;
function HasWeakRef(T: TypeIdentifier): Boolean;
function GetTypeKind(T: TypeIdentifier): TTypeKind;
function IsConstValue(Value): boolean;
Delphi XE6
Delphi XE5
需要配备ArmV6 + Neon或ArmV7的设备进行部署
介绍conditional define ANDROID
Delphi XE4
自动退款
中央处理器
EXTERNAL_LINKER
iOS
下一代
UNDERSCOREIMPORTNAME
弱引用
WEAKINSTREF
弱引用
dependency
directive(在XE8之前未记录)。 Note that much of the groundwork for ARC was already in XE3, but much of it was disabled
$IF
statements could only be terminated with $IFEND
和$IFDEF
,$IFNDEF
和$IFOPT
指令只能以$ENDIF
终止。 在XE4上,情况发生了变化,因此$ ENDIF成为$ IF,$ IFDEF,$ IFNDEF和$ IFOPT的可接受终止符。
Delphi XE3
AtomicExchange()
, AtomicIncrement()
, AtomicCmpExchange()
, AtomicDecrement()
Delphi XE2
Packed
Now Forces Byte Alignment of Records(在XE2之前的版本中不一定要这样做)ALIGN_STACK
CPUX86
CPUX64
MACOS(Mac操作系统)
MACOS32
PC_MAPPED_EXCEPTIONS
PIC
WIN64
uses
clause. {$ExcessPrecision on/off}
compiler directive(仅x64)Delphi XE
{$STRINGCHECKS}
编译器指令; {$ALIGN}
指令的新16字节值:{$ALIGN}
指令的可接受值现在包括1、2、4、8和16。{$CODEALIGN}
指令,它设置过程或函数的起始地址。 {$STRONGLINKTYPES ON}
指令Delphi 2010
as
运算符可用于将接口(interface)引用投射回提取它的对象。 is
运算符可用于验证是否从某个类中提取了接口(interface)引用。 TObject(SomeInterface)
。 delayed
指令指示在声明时不要加载诸如DLL之类的外部库,而要等到第一次调用Delphi 2009
string
现在映射到UnicodeString
; {$HighCharUnicode on|off}
compiler directive function Default(T): T
intrinsic function (Undocumented) {$PointerMath on|off}
; W1057 Implicit string cast from '%s' to '%s'
,W1058 Implicit string cast with potential data loss from '%s' to '%s'
,W1059 Explicit string cast from '%s' to '%s'
,W1060 Explicit string cast with potential data loss from '%s' to '%s'
; Exit
函数可以使用指定结果的参数。 resourcestrings
为宽字符串; TObject
除了其VMT指针外还有extra hidden pointer to TMonitor
; deprecated
关键字现在可以具有其他文本Delphi 2007
请注意,Delphi 2007是一个不间断的发行版,D2006中的DCU将在D2007中保持不变。
Delphi 2006
static
方法和属性; strict
private/protected visibility keyword; final
关键字用于虚拟方法; {$METHODINFO}
指令; Delphi 2005
for ... in
循环,inline
关键字{$REGION}
/ {$ENDREGION}
指令Delphi 7
{$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}
编译器指令experimental
, deprecated
, library
, platform
(但不包含其他不推荐使用的文本)OLEVariant
{$J+}
) varargs
外部函数(但仅适用于cdecl
调用约定)Delphi 5
没有新的语言功能,但是:
Delphi 4
LongWord
和Int64
; Cardinal
是一个UINT32(在未签名31位值之前)Real
占用8个字节,与double
相同(以前是6个字节);{$REALCOMPATIBILITY ON}
编译器指令覆盖; REAL48
替换了原来的6字节real
; resourcestrings
{$EXTERNALSYM}
和{$NODEFINE}
指令implements
keyword用于属性Delphi 3
true
存储为-1
而不是1( bool(boolean) 值不变)packages
安装组件。 out
参数。 Widestring
interface
和dispinterface
关键字以及COM(dispid
)支持。 Delphi 2
Ansistring
将shortstring
替换为默认字符串类型Currency
Variant
(用于与OLE自动化互操作)。 ThreadVar
关键字。 packed
关键字将覆盖此行为; 1899/12/30
处开始,在0000/00/00
处开始finalization
关键字register
和stdcall
调用约定。 packed
关键字。 关于delphi - 引入/不推荐使用的Delphi语言功能和版本列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8460037/