Variable Modifiers

From Appmethod Topics
Jump to: navigation, search

Go Up to Declaration Syntax Index

In addition to the storage class specifier keywords, a declaration can use certain modifiers to alter some aspect of the identifier. The modifiers available are summarized in Function Modifiers.

The following table summarizes the effects of a modifier applied to a called function. For every modifier, the table shows the order in which the function parameters are pushed on the stack. Next, the table shows whether the calling program (the caller) or the called function (the callee) is responsible for popping the parameters off the stack. Finally, the table shows the effect on the name of a global function.

Calling Conventions:

Modifier Push parameters Pop parameters Name change (only in C)

__cdecl1

Right to left

Caller

'_' prepended

__fastcall

Left to right

Callee

'@' prepended

__pascal

Left to right

Callee

Uppercase

__stdcall

Right to left

Callee

No change


1 __cdecl is the default.

Note: Note: __fastcall and __stdcall are always name mangled in C++. See the description of the -VC option in BCC32.

See Also