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

{
/* Lots of code */
}
void anotherproc (int i);
{ int total;
total = 259;
/* Some code */
someproc (23,,,total);
/* Omit length and limit parameters */
}
Converting Variable Functions to Extensible Functions
You can convert a TNS C or C++ variable function into an extensible function. When you do so,
the compiler converts the _variable parameter mask into an _extensible parameter mask.
Converting a native C or C++ variable function into an extensible function is unnecessary, because
native C and C++ treat functions declared variable or extensible as extensible functions.
NOTE: To convert a variable function into an extensible function, you must use the deprecated
syntax for writing function declarations. This syntax uses the _variable and _extensible
attributes described in Attribute Specifier (page 55). You cannot use the FUNCTION pragma in
this case. Isolate use of this deprecated declaration syntax.
Converting a variable function to extensible is the only way to add parameters to the function
without recompiling all its callers. You can add new parameters at the time you convert the function
or later.
You can convert any variable function that meets these criteria:
It has at least one parameter.
It has no more than 16 words of parameters.
All parameters are one word long except the last, which can be one word or longer.
The size of a formal reference parameter is one word for the small-memory model and two words
for the large-memory model.
To convert an existing variable function to extensible, redeclare the function and add these
information:
Any new formal parameters
The keyword _extensible
The number of formal parameters in the variable function, specified as an int value in the
range 1 through 15 and enclosed in parentheses
This example converts a variable function to an extensible function and adds a new formal
parameter, p3. The value 2 in parentheses specifies that the function had two formal parameters
before it was converted.
_c _extensible (2) void errmsg (int p1, char *p2, int p3);
{
/* Lots of code */
}
148 System-Level Programming