|
Delphi mode (Default Mode) |
Top Previous Next |
|
What is translated > Routines > Translation modes > Delphi mode (Default Mode) This is the default translation mode for regular Delphi code.
It preserves Delphi semantics and uses modern, type-safe C++ constructs.
Characteristics
Calling convention:
Portable compilers (MSVC, GCC, Clang):
default calling convention (typically __cdecl)
C++Builder:
__fastcall (Delphi-compatible)
Types:
Boolean -> bool Integer -> int String -> Portable: std::wstring (or project-specific mapping) C++Builder: System::UnicodeString
Parameters:
var / out -> T&
Interfaces:
mapped to DelphiInterface<T>
Example
Delphi:
function Add(A, B: Integer): Integer;
C++ (Portable)
int Add(int A, int B);
C++ (Portable)
int __fastcall Add(int A, int B);
|
|
This page belongs to the Delphi2Cpp Documentation |
Delphi2Cpp home Content |