Delphi 与 C/C++ 数据类型对照表(最新的tokyo)
更新,下面这table为最新的tokyo基本数据类型与C++的对照关系:
Delphi to C++ types mapping
Go Up to Support for Delphi Data Types and Language Concepts
Below is a list of Delphi data types and the corresponding C++ data types:
Delphi type | defined in sysmac.h | Platform | Corresponding C++ type |
---|---|---|---|
Boolean |
bool | ||
ShortInt |
System::Int8 |
signed char | |
SmallInt |
short | ||
Integer |
int | ||
Int64 |
__int64 | ||
Byte |
System::Byte |
unsigned char | |
Word |
System::Word |
unsigned short | |
Cardinal |
unsigned | ||
UInt64 |
unsigned __int64 | ||
NativeInt | System::NativeInt | 32-bit platforms | int |
64-bit Windows | __int64 | ||
64-bit iOS 64-bit Linux |
long | ||
NativeUInt | System::NativeUInt | 32-bit platforms | unsigned int |
64-bit Windows | unsigned __int64 | ||
64-bit iOS 64-bit Linux |
unsigned long | ||
LongInt | 32-bit platforms 64-bit Windows |
int | |
64-bit iOS 64-bit Linux |
long | ||
LongWord | 32-bit platforms 64-bit Windows |
unsigned | |
64-bit iOS 64-bit Linux |
unsigned long | ||
FixedInt |
int | ||
FixedUInt |
unsigned int | ||
Single |
float | ||
Double |
double | ||
Extended |
System::Extended |
long double | |
Currency |
System::Currency, System::CurrencyBase |
||
Comp |
System::Comp, System::CompBase |
||
Real |
double | ||
ShortString |
System::ShortString, System::ShortStringBase |
||
OpenString |
System::OpenString |
char* const | |
String | System::UnicodeString | ||
WideString | System::WideString | ||
AnsiChar | char | ||
Char | System::WideChar | Windows platforms | wchar_t |
Posix platforms | char16_t | ||
WideChar | System::WideChar | Windows platforms | wchar_t |
Posix platforms | char16_t | ||
File |
System::file |
||
Text |
System::TextFile |
||
ByteBool |
System::ByteBool |
unsigned char | |
WordBool |
System::WordBool |
unsigned short | |
LongBool |
System::LongBool |
int | |
Real48 |
not supported in C++ |
||
Pointer |
void* | ||
PWideChar |
System::WideChar* |
Windows platforms | wchar_t* |
Posix platforms | char16_t* | ||
PAnsiChar |
char* | ||
Variant |
System::Variant defined in sysvari.h |
||
OleVariant |
System::OleVariant defined in sysvari.h |
- Note: 32-bit platforms include 32-bit Windows, 32-bit macOS, 32-bit iOS, and Android.
POSIX platforms include macOS, iOS, iOS-simulator, Android, and Linux.
Delphi | 数据类型 | C/C++ |
---|---|---|
ShorInt | 8位有符号整数 | char |
Byte | 8位无符号整数 | BYTE,unsigned short |
SmallInt | 16位有符号整数 | short |
Word | 16位无符号整数 | unsigned short |
Integer,LongInt | 32位有符号整数 | int,long |
Cardinal,LongWord/DWORD | 32位无符号整数 | unsigned long |
Int64 | 64位有符号整数 | _int64 |
Single | 4字节浮点数 | float |
*Real48 | 6字节浮点数 | |
Double | 8字节浮点数 | double |
*Extended | 10字节浮点数 | long double |
Currency | 64位货币类型 | |
TDate/TDateTime | 8字节日期/时间 | |
Variant,OleVariant | 16字节可变类型 | VARIANT,^Variant,^OleVariant |
Char,AnsiChar | 1字节字符 | char |
WideChar | 2字节字符 | WCHAR |
*ShortString | 短字符串 | |
AnsiString/String | 长字符串 | ^AnsiString |
WideString | 宽字符串 | ^WideString |
PChar,PAnsiChar | NULL结束的字符串 | char* |
PWideChar | NULL结束的宽字符串 | LPCWSTR |
Boolean,ByteBool | 1字节布尔类型 | 任何1字节 |
WordBool | 2字节布尔类型 | 任何2字节 |
BOOL,LongBool | 4字节布尔类型 | BOOL |
注:有*前缀的是向前兼容类型;有^前缀的是C++Builder特有类型。 |
C/C++ | Delphi |
---|---|
ABC | TABC |
ACCEL | TAccel |
ATOM | TAtom |
BITMAP | TBitMap |
BITMAPCOREHEADER | TBitmapCoreHeader |
BITMAPCOREINFO | TBitmapCoreInfo |
BITMAPFILEHEADER | TBitmapFileHeader |
BITMAPINFO | TBitmapInfo |
BITMAPINFOHEADER | TBitmapInfoHeader |
BOOL | Bool |
CBT_CREATEWND | TCBT_CreateWnd |
CBTACTIVATESTRUCT | TCBTActivateStruct |
CHAR | Char |
CHAR* | PChar |
CLIENTCREATESTRUCT | TClientCreateStruct |
COLORREF | TColorRef |
COMPAREITEMSTRUCT | TCompareItemStruct |
COMSTAT | TComStat |
CREATESTRUCT | TCreateStruct |
CTLINFO | TCtlInfo |
CTLSTYLE | TCtlStyle |
CTLtype | TCtltype |
DCB | TDCB |
DDEAACK | TDDEAck |
DDEADVISE | TDDEAdvise |
DDEDATA | TDDEData |
DDEPOKE | TDDEPoke |
DEBUGHOOKINFO | TDebugHookInfo |
DELETEITEMSTRUCT | TDeleteItemStruct |
DEVMODE | TDevMode |
DOUBLE | Double |
DRAWITEMSTRUCT | TDrawItemStruct |
DWORD | LongInt |
ENUMLOGFONT | TEnumLogFont |
EVENTMSG | TEventMsg |
FARPROC | TFarProc |
FIXED | TFixed |
FLOAT | Single |
GLYPHMETRICS | TGlyphMetrics |
HANDLE | THandle |
HANDLETABLE | THandleTable |
HARDWAREHOOKSTRUCT | THardwareHookStruct |
HELPWININFO | THelpWinInfo |
INT | Integer |
KERNINGPAIR | TKerningPair |
LOGBRUSH | TLogBrush |
LOGFONT | TLogFont |
LOGPALETTE | TLogPalette |
LOGPEN | TLogPen |
LONG | LongInt |
LONG DOUBLE | Extended |
LONG INT | LongInt |
LPSTR | PChar |
LPWSTR | PWideChar |
MAT2 | TMat2 |
MDICREATESTRUCT | TMDICreateStruct |
MEASUREITEMSTRUCT | TMeasureItemStruct |
MENUITEMTEMPLATE | TMenuItemTemplate |
MENUITEMTEMPLATEHEADER | TMenuItemTemplateHeader |
METAFILEPICT | TMetaFilePict |
METAHEADER | TMetaHeader |
METARECORD | TMetaRecord |
MINMAXINFO | TMinMaxInfo |
MOUSEHOOKSTRUCT | TMouseHookStruct |
MSG | TMsg |
MULTIKEYHELP | TMultiKeyHelp |
NCCALCSIZE_PARAMS | TNCCalcSize_Params |
NEWTEXTMETRIC | TNewTextMetric |
OFSTRUCT | TOFStruct |
OUTLINETEXTMETRIC | TOutlineTextMetric |
PAINTSTRUCT | TPaintStruct |
PALETTEENTRY | TPaletteEntry |
PANOSE | TPanose |
PATTERN | TPattern |
POINTFX | TPointFX |
PSTR | PChar |
PWSTR | PWideChar |
RASTERIZER_STATUS | TRasterizer_Status |
RGBQUAD | TRGBQuad |
RGBTRIPLE | TRGBTriple |
SEGINFO | TSegInfo |
SHORT | SmallInt |
SHORT INT | SmallInt |
SIZE | TSize |
TEXTMETRIC | TTextMetric |
TPOINT | TPoint |
TRECT | TRect |
TTPOLYCURVE | TTTPolyCurve |
TTPOLYGONHEADER | TPolygonHeader |
UINT | Word |
UNSIGNED | Word |
UNSIGNED CHAR | Byte |
UNSIGNED INT | Word |
UNSIGNED LONG | LongInt(DWORD) |
UNSIGNED LONG INT | LongInt |
UNSIGNED SHORT | Word |
UNSIGNED SHORT INT | Word |
VOID* | Pointer |
WINDOWPLACEMENT | TWindowPlacement |
WINDOWPOS | TWindowPos |
WNDCLASS | TWndClass |
WORD | Word |
Delphi 与 C/C++ 数据类型对照表(最新的tokyo)的更多相关文章
- Delphi 与 C/C++ 数据类型对照表
Delphi 数据类型 C/C++ ShorInt 8位有符号整数 char Byte 8位无符号整数 BYTE,unsigned short SmallInt 16位有符号整数 short Word ...
- Java数据类型与MySql数据类型对照表
这篇文章主要介绍了Java数据类型与MySql数据类型对照表,以表格形式分析了java与mysql对应数据类型,并简单讲述了数据类型的选择与使用方法,需要的朋友可以参考下 本文讲述了Java数据类型与 ...
- [JNA系列]Java调用Delphi编写的Dll之Delphi与JAVA基本数据类型对比
Delphi与JAVA基本数据类型对比 类型 Delphi关键字 JAVA关键字 字节 备注 范围 整型 Shortint byte 1 有符号8位 -128..127 Byte 1 无符号8位 0 ...
- delphi基础篇之数据类型概论
delphi基础篇之数据类型概论 Object Pascal 语言提供了非常丰富的数据类型,即简单类型(Simple).字符串类型(String).结构类型(Struct).指针类型(Pointer) ...
- Windows API 的数据类型与 Delphi 数据类型对照表
Windows 数据类型 Delphi 数据类型 描述 LPSTR PAnsiChar 字符串指针 LPCSTR PAnsiChar 字符串指针 DWORD LongWord 整数 BOOL Long ...
- Delphi中的基础数据类型
参考http://www.cnblogs.com/del/archive/2007/12/04/982167.html 在学习之初,在这么多的数据类型中,最好记住这五种标准数据类型(整型.实型.字符型 ...
- delphi xe5 android iny绿色版+最新SDK/NDK安装方法
转自: http://bbs.2ccc.com/topic.asp?topicid=438595 首先感谢iny的绿色版,因为我的精简Win7 32位安装原版镜像4.63G过程正常,但是编译出错,后来 ...
- Delphi与各数据库数据类型比较
Delphi数据类型与各数据库数据类型对比如下表,如有具体说明见表中脚注: Delphi Type Oracle Types SQL Server Types MySQL Types [1] Inte ...
- delphi基础篇之数据类型
Object Pascal 数据类型 数据类型与定义变量 Object Pascal 语言的最大特点是对数据类型的要求非常严谨.传递给过程或函数的参数值必须与形参的类型一致.在Object ...
随机推荐
- 【Android开发日记】之入门篇(一)——开发环境的搭建
写给自己的话:至此,大学的时光已经剩下一年的时光,下一年等毕业设计结束后就算是正式地踏入社会.自己学android也不过几个月的时间,为了更好管理文档,写点东西记录下自己曾经做过的点点滴滴是一个不错的 ...
- Request的Body只能读取一次解决方法
一.需要一个类继承HttpServletRequestWrapper,该类继承了ServletRequestWrapper并实现了HttpServletRequest, 因此它可作为request在F ...
- c++类的隐藏,覆盖和重载,using关键字使用
转载一篇文章: http://www.cnblogs.com/ustc11wj/archive/2012/08/11/2637316.html 类的隐藏和重载不一样 类的隐藏是指 一个类继承自另外一个 ...
- C/C++/C#程序如何打成DLL动态库
C/C++程序如何打成DLL动态库:1.在VS中新建main.h,添加如下内容:extern "C" _declspec(dllexport) int onLoad(); 2.新建 ...
- Codeforces Round #446 (Div. 2) C. Pride【】
C. Pride time limit per test 2 seconds memory limit per test 256 megabytes input standard input outp ...
- 用fiddler测试移动端翻页
大家在移动端是怎么测试翻页的,肯定都是下拉或上滑吧,我也是这样测试的 但如果你要验证数据是否与pc端数据一致时,可能是第一页,第二页看看,或最后几页数据看看,在pc端看简单,直接点击最后一页就行,在移 ...
- kibana-metric
1. Visualize 新建图形 2. 选择图形类型 3. 选择索引 4. 设置metric参数 4.1 count 4.2 unique count 5. 保存图形
- Android入门之文件系统操作(一)简单的文件浏览器 (转)
Android入门之文件系统操作(一)简单的文件浏览器 (转) import java.io.File; import java.util.*; import android.app.A ...
- 模拟Spring中的getBean方法
一直知道Spring是运用反射技术的,但具体怎么用呢?今天就模拟下getBean方法. 步骤: 1.用Dom4j解析xml配置文件,取出我们需要的信息 2.遍历Bean节点,根据每个Bean节点的cl ...
- Tomcat服务器多域名配置(转载)
Tomcat服务器多域名配置 我们来讲解下如何在Tomcat服务器上进行多域名配置: 也就是一个Tomcat跑多网站,这里用真实案例举例,比如我这个云主机需要运行两个网站: pan.java1234. ...