• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

DELPHI 32位与64位数据类型大小

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

Delphi 32-bit and 64-bit Windows built-in type sizes

Integral types

On Win64, NativeInt is twice the size of the Win32 NativeInt, and NativeUInt is twice the size of the Win32 NativeUInt.

Signed Integer

Unsigned Integer

Delphi/32

Delphi/64

Comments

ShortInt

Byte

1 byte

 

SmallInt

Word

2 bytes

 

LongInt

LongWord

4 bytes

 

Integer

Cardinal

4 bytes

 

Int64

UInt64

8 bytes

 

NativeInt

NativeUInt

4 bytes

8 bytes

 

Pointer types

On 64-bit Windows, all pointer types are 8 bytes, twice the size on 32-bit Windows.

Pointer types

Delphi/32

Delphi/64

Pointer

4 bytes

8 bytes

string

class instance

class reference

interface

AnsiString

WideString

UnicodeString

procedure pointer

dynamic array

PAnsiChar

PWideChar

PChar

Procedure of object

On 64-bit Windows, the alignment for a procedure of object is 16 bytes, twice the size on 32-bit Windows.

procedure of object

8 bytes

16 bytes

 

 

8 byte align

8 byte align

Known as closure type

 

Floating-point types (including the Extended data type)

The Extended type has 2 bytes' worth less precision on 64-bit Windows than on 32-bit Windows (8 bytes vs 10 bytes)..

For more information, see The Extended Data Type Is 2 Bytes Smaller on 64-bit Windows Systems.

Floating point types

Delphi/32

Delphi/64

Comments

Single

4 bytes

 

Double

8 bytes

 

Real

8 bytes

 

Extended

10 bytes

8 bytes

TExtended80Rec has 10 bytes on Win64

Real48

6 bytes

 

Comp

8 bytes

 

Currency

8 bytes

 

Other types

On Win64, file size has increased.

Other types

Delphi/32

Delphi/64

Comments

Boolean

1 byte

 

ByteBool

1 byte

 

WordBool

2 bytes

 

LongBool

4 bytes

 

AnsiChar

1 byte

 

WideChar

2 bytes

 

Char

2 bytes

 

ShortString

256 bytes

 

string[N]

N+1 bytes

 

Variant OleVariant

16 bytes

24 bytes

file

592 bytes

616 bytes

 

Text TextFile

730 bytes

754 bytes

720 bytes in XE release

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Delphi文件操作所涉及的一些函数发布时间:2022-07-18
下一篇:
delphi调用外部exe,并等待调用程序运行结束发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap