Delphi 型と C++ 型のマッピング
Delphi データ型とそれに対応する C++ データ型の一覧を以下に示します:
Delphi 型 | sysmac.h で定義 | プラットフォーム | 対応する C++ での型 |
---|---|---|---|
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ビット プラットフォーム | int |
64ビット Windows | __int64 | ||
64ビット iOS 64ビット Linux |
long | ||
NativeUInt | System::NativeUInt | 32ビット プラットフォーム | unsigned int |
64ビット Windows | unsigned __int64 | ||
64ビット iOS 64ビット Linux |
unsigned long | ||
LongInt | 32ビット プラットフォーム 64ビット Windows |
int | |
64ビット iOS 64ビット Linux |
long | ||
LongWord | 32ビット プラットフォーム 64ビット Windows |
unsigned | |
64ビット iOS 64ビット 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 プラットフォーム | wchar_t |
Posix プラットフォーム | char16_t | ||
WideChar | System::WideChar | Windows プラットフォーム | wchar_t |
Posix プラットフォーム | char16_t | ||
File |
System::file |
||
Text |
System::TextFile |
||
ByteBool |
System::ByteBool |
unsigned char | |
WordBool |
System::WordBool |
unsigned short | |
LongBool |
System::LongBool |
int | |
Real48 |
C++ では未対応 | ||
Pointer |
void* | ||
PWideChar |
System::WideChar* |
Windows プラットフォーム | wchar_t* |
Posix プラットフォーム | char16_t* | ||
PAnsiChar |
char* | ||
Variant |
System::Variant sysvari.h で定義 |
||
OleVariant |
System::OleVariant sysvari.h で定義 |
- メモ: 32 ビット プラットフォームには、32 ビット Windows、32 ビット macOS、32 ビット iOS、Android が含まれます。
POSIX プラットフォームには、macOS、iOS、iOS シミュレータ、Android、Linux が含まれます。