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

Delphi与.Net交叉调用研究结果

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

Delphi.Net内置类型对照表

长度

Delphi

.Net

是否匹配

布尔值

Boolean (单字节)

Byte true($01) false($00)

Byte

无匹配项

Byte仅用于0/1匹配

ByteBool (单字节)

Byte true($ff) false($00) others true

Byte

值完全匹配可传递不推荐使用

WordBool (双字节)

Word true($ffff) false($0000) others true

UInt16

值完全匹配可传递不推荐使用

LongBool (四字节)

DWord true($ffffffff) false($00000000) others true

UInt32

值完全匹配可传递不推荐使用

LongBool (四字节)sizeof(LongBool) = 4

DWord true($ffffffff) false($00000000) others true

Boolean sizeof(Boolean) = 1

DWord true(1) false(0) others true 默认值false

完全匹配

单字节

ShortInt  

-128~127

Sbyte/sbyte

-128~127 默认值0

完全匹配

Byte  

0~255

Byte/byte

0~255 默认值0

完全匹配

Char/AnsiChar

AnsiChar最初模仿ANSI字符集(名称来源),但现在用于扩大到是指当前的本地字符集

Byte

无匹配项

Byte仅可用于内存匹配

双字节

SmallInt 

-32,768~32,767

Int16/short

-32,768~32,767 默认值0

完全匹配

Word 

0~65,535

UInt16/ushort

0~65,535 默认值0

完全匹配

WideChar  Unicode字符

char Unicode 字符

U+0000~U+ffff默认值’\0’

待测试

四字节

Integer/ LongInt 

-2,147,483,648~2,147,483,647

Int32/int

-2,147,483,648~2,147,483,647 默认值0

完全匹配

LongWord/ Cardinal 

0~4,294,967,295

UInt32/uint

0~4,294,967,295 默认值0

完全匹配

八字节


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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