C/C++ Programmer's Guide (G06.25+)
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
13-37
FUNCTION
Use alias to describe the name of a function written in COBOL, FORTRAN, 
D-series Pascal, or TAL that does not have a valid C name.
resident
causes the function code to remain in main memory for the duration of program 
execution. The operating system does not swap pages of this code. Binder or 
a linker allocate storage for resident functions as the first functions in the code 
space.
variable
directs the compiler to treat all formal parameters of the function as though 
they were optional, even if some parameters are required by your code. If you 
add new parameters to a variable function, all callers to the function must be 
recompiled. 
Variable functions are equivalent to VARIABLE procedures in TAL, pTAL, and 
D-series Pascal. For details, see Writing Variable and Extensible Functions on 
page 9-4.
extensible [ (param-count) ]
directs the compiler to treat all parameters of the function as though they were 
optional, even if some parameters are required by your code. You can add new 
formal parameters to an extensible function without recompiling callers unless 
the callers use the new parameters. 
extensible functions are equivalent to EXTENSIBLE procedures in TAL, pTAL, 
and D-series Pascal. For details, see Writing Variable and Extensible Functions 
on page 9-4.
Table 13-3 on page 13-37 shows the effect of FUNCTION attributes for each language. 
“Valid” indicates that the compiler accepts the attribute. “Ignore” indicates that the 
compiler accepts but ignores the attribute. “Error” indicates that the compiler issues an 
error.
Table 13-3. Effects of FUNCTION Attributes
Language No attribute extensible resident variable alias
c Valid Valid Valid Valid Valid
cobol Valid Error Ignore Error Valid
fortran Valid Error Ignore Error Valid
pascal Valid Valid Ignore Valid Valid
tal Valid Valid Valid Valid Valid
unspecified Valid Valid Ignore Valid Valid










