Support for Object Pascal Data Types and Language Concepts

From Appmethod Topics
Jump to: navigation, search

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

To support the RTL, Appmethod C++ 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 Appmethod C++. 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 Appmethod C++ when sharing code between these languages.

This section summarizes how Appmethod C++ implements the Object Pascal language, and suggests when to use caution.

See Also