用Delphi 写C语言的上位机程序时感觉数据类型的对应很重要,总结如下:
『Delphi和C++数据类型对照表』
Delphi
ShortInt
SmallInt
LongInt
Byte
Word
Integer
Cardinal
DWord 32位无符号整型
Boolean
ByteBool
WordBool
LongBool
AnsiChar
WideChar
Char
AnsiString
String[n]
ShortString
String
Single
Double
Extended
Real
Pointer
PChar
PAnsiChar
Comp
OleVariant
{ Useful alias types in Delphi }
type
Int8 = ShortInt;
Int16 = SmallInt;
Int32 = Integer;
UInt8 = Byte;
UInt16 = Word;
UInt32 = Cardinal
『Win32API与C语言数据类型对照表』
Win32API
HANDLE
BYTE
SHORT
WORD
INT
UINT
LONG
BOOL
DWORD
ULONG
CHAR
LPSTR
LPCSTR
LPWSTR
LPCWSTR
FLOAT
DOUBLE
本文总结了Delphi与C++的数据类型对照表,包括基本整型、浮点型、字符型、布尔型及指针等类型,并提供了Win32API与C语言的数据类型对照,有助于跨平台开发人员理解不同语言间的类型转换。
305

被折叠的 条评论
为什么被折叠?



