pascal, _pascal, __pascal (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Keywords, Alphabetical Listing Index

Note: This feature is available only for the classic bcc32 compiler, not for the modern Clang-enhanced compiler.


Modifiers (C++), Keyword Extensions


pascal <data-definition/function-definition> ;
_pascal <data-definition/function-definition> ;
__pascal <data-definition/function-definition> ;


Use the pascal, _pascal, and __pascal keywords to declare a variable or a function using a Pascal-style naming convention (the name is in uppercase).

In addition, pascal declares Delphi language-style parameter-passing conventions when applied to a function header (parameters pushed left to right; the called function cleans up the stack).

In C++ programs, functions declared with the pascal modifier are still mangled.

Note: The __pascal form is the only one supported by Clang-enhanced C++ compilers.