Support for Delphi Data Types and Language Concepts

From RAD Studio
Jump to: navigation, search

Go Up to Language Support for the RAD Studio Libraries (C++)

To support the RTL, C++Builder implements, translates, or otherwise maps most Delphi data types, constructs, and language concepts to the C++ language. This is done in the following ways:

  • Typedefs to native C++ types
  • Classes, structs, and class templates
  • C++ language counterparts
  • Macros
  • Keywords that are ANSI-conforming language extensions

Not all aspects of the Delphi language map cleanly to C++. Occasionally, using these parts of the language can lead to unexpected behavior in your application. For example:

  • Some types exist in both Delphi and in C++, but are defined differently. These can require caution when sharing code between these two languages.
  • Some extensions were added to Delphi for the purpose of supporting C++Builder. Occasionally these can have subtle interoperability impact.
  • Delphi types and language constructs that have no mapping to the C++ language should be avoided in C++Builder when sharing code between these languages.

This section summarizes how C++Builder implements the Delphi language, and suggests when to use caution.


See Also