Mappage des types Delphi en types C++
Remonter à Gestion des types de données et des concepts du langage Delphi
Voici la liste des types de données Delphi et des types de données C++ correspondants :
| Type Delphi | défini dans sysmac.h | Plate-forme | Type C++ correspondant |
|---|---|---|---|
|
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 | Plates-formes 32 bits | int |
| Windows 64 bits | __int64 | ||
| iOS 64 bits Linux 64 bits |
long | ||
| NativeUInt | System::NativeUInt | Plates-formes 32 bits | unsigned int |
| Windows 64 bits | unsigned __int64 | ||
| iOS 64 bits Linux 64 bits |
unsigned long | ||
| LongInt | Plates-formes Windows 32 bits et 64 bits |
int | |
| iOS 64 bits Linux 64 bits |
long | ||
| LongWord | Plates-formes Windows 32 bits et 64 bits |
unsigned | |
| iOS 64 bits Linux 64 bits |
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 | Plates-formes Windows | wchar_t |
| Plates-formes Posix | char16_t | ||
| WideChar | System::WideChar | Plates-formes Windows | wchar_t |
| Plates-formes Posix | char16_t | ||
|
File |
System::file |
||
|
Text |
System::TextFile |
||
|
ByteBool |
System::ByteBool |
unsigned char | |
|
WordBool |
System::WordBool |
unsigned short | |
|
LongBool |
System::LongBool |
int | |
|
Real48 |
non supporté dans C++ | ||
|
Pointer |
void* | ||
|
PWideChar |
System::WideChar* |
Plates-formes Windows | wchar_t* |
| Plates-formes Posix | char16_t* | ||
|
PAnsiChar |
char* | ||
|
Variant |
System::Variant défini dans sysvari.h |
||
|
OleVariant |
System::OleVariant Défini dans sysvari.h |
||
- Remarque : Les plates-formes 32 bits incluent Windows 32 bits, macOS 32 bits, iOS 32 bits et Android.
Les plates-formes POSIX incluent macOS, iOS, le simulateur iOS, Android et Linux.