The following table summarizes how Fortran, Visual C/C++, Visual Basic and MASM handle procedure names. Note that for MASM, the table does not apply if the CASEMAP: ALL option is used.
Naming Conventions in Fortran, C, Visual C++, Visual Basic, and MASM
Language | Attributes | Name Translated As | Case of Name in .OBJ File |
---|---|---|---|
Fortran | cDEC$ ATTRIBUTES C | _name | All lowercase |
Fortran | cDEC$ ATTRIBUTES STDCALL | _name@n | All lowercase |
Fortran | default | _name@n | All uppercase |
C | cdecl (default) | _name | Mixed case preserved |
C | __stdcall | _name@n | Mixed case preserved |
Visual C++ | Default | _name@@decoration | Mixed case preserved |
Visual Basic | Default | _name@n | Mixed case preserved |
MASM | C (in PROTO and PROC declarations) | _name | Mixed case preserved |
MASM | STDCALL (in PROTO and PROC declarations) | _name@n | Mixed case preserved |
In the preceding table:
For example, assume a function is declared in C as:
extern int __stdcall Sum_Up( int a, int b, int c );
Each integer occupies 4 bytes, so the symbol name placed in the .OBJ file on ia32 systems is:
_Sum_Up@12
On ia64 systems, the symbol name placed in the .OBJ file is:
Sum_Up