C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
C and C++ Extensions
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
2-13
Declarations
Considerations for the native compilers only:
An _extensible function is limited to 31 parameters. If more are supplied
an error message is generated.
_extensible and _variable are treated the same, _variable is a
synonym for _extensible
Considerations for the TNS compilers only:
A function with no prototype declaration or definition under pragma
OLDCALLS cannot be _extensible.
Considerations for both the native and TNS compilers:
_extensible and _variable attributes cannot be specified for the same
function.
C-style variable argument lists (...) are not allowed.
An _extensible attribute cannot be specified for a function that passes a
structure by value.
Returning structures by value is not allowed.
For _extensible(n), an error is generated if n is greater than the number
of formal parameters.
In C++ these guidelines apply:
°
_extensible functions can neither be overloaded nor have default
parameters.
°
_extensible cannot be specified on global function templates, that is,
function templates that are not members of a class.
°
_extensible cannot be specified on template member functions, that
is, the member functions of a template class.
°
_extensible cannot be used on class member functions of any class.
_extensible functions in C and C++ are equivalent to extensible procedures
in TAL, pTAL, and D-series Pascal. For further discussion of _extensible
functions in C and C++, see Section 9, System-Level Programming. For further
discussion of declaring external routines that are written in pTAL, TAL, or D-
series Pascal and that are extensible, see Section 7, Mixed-Language
Programming for TNS Programs, or Section 8, Mixed-Language Programming
for TNS/R and TNS/E Native Programs.
_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.