当前位置:编程学习 > Delphi >>

Delphi和C++数据类型对照表

Delphi                 字长/值域                                                                 C++

ShortInt         8位有符号整型                                                     signed   char
SmallInt         16位有符号整型                                                 short
LongInt             32位有符号整型                                                 int
Byte                 8位无符号整型                                                     unsigned   char
Word                 16位无符号整型                                                 unsigned   short
Integer             32位有符号整型                                                 int
Cardinal         32位无符号整型                                                 unsigned   int
Boolean             真/假                                                                     bool
ByteBool         真/假   或   8位无符号整型                                 unsigned   char
WordBool         真/假   或   16位无符号整型                                 unsigned   short
LongBool         真/假   或   32位无符号整型                                 BOOL   (WinAPI)
AnsiChar         8位无符号字符                                                     char
WideChar         宽字编码字符                                                     wchar_t
Char                 8位无符号字符                                                     char
AnsiString     Delphi的字符串类                                             AnsiString   类
String[n]         老式的Delphi字符串,   n   =   1..255字节         SmallString<n>   模板类
ShortString     老式的Delphi字符串,   255字节                         SmallString<255>
String             Delphi的AnsiString类                                     AnsiString
Single             32位浮点数                                                         float
Double             64位浮点数                                   &n

补充:软件开发 , Delphi ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,