C/C++ Programmer's Guide (G06.25+)

Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-008
13-36
FUNCTION
FUNCTION
The FUNCTION pragma declares attributes of external routines. The FUNCTION
pragma is used at function declaration, not at function definition.
c-function-name
is the name used inside the program to refer to the external routine.
language
is the name of the language of the external routine. tal identifies both TAL and
pTAL routines.
attribute
specifies a function attribute, which is one of:
alias ("external-name")
identifies the name of the external routine used by Binder or a linker.
external-name can include any character that Binder or a linker recognizes.
The external-name specification is treated as follows:
The TNS/R C/C++ compiler does not modify the string supplied as the
external-name specification in any manner; that is, it does not upshift it.
The TNS C/C++ compiler upshifts the external-name string if the
language is cobol, fortran, pascal, or tal. However, if the language is C or
unspecified, the TNS compiler does not modify the name.
The external-name argument must be enclosed in parentheses and
quotation marks, as indicated in the syntax. For example:
alias ("MyTALFunction")
FUNCTION c-function-name
( attribute-specifier [ , attribute-specifier ] )
attribute-specifier:
{ language | attribute }
language:
{ c | cobol | fortran | pascal | tal | unspecified }
attribute:
{ alias ( " external-name " ) | resident | variable |
extensible [ ( param-count ) ] }