Support for Object Pascal 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 Object Pascal 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 Object Pascal 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 Object Pascal and in C++, but are defined differently. These can require caution when sharing code between these two languages.
  • Some extensions were added to Object Pascal for the purpose of supporting C++Builder. Occasionally these can have subtle interoperability impact.
  • Object Pascal 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 Object Pascal language, and suggests when to use caution.

Topics

See Also