HP C/iX Reference Manual (31506-90011)

54 Chapter3
Data Types and Declarations
Function Definitions
int p1, p2; /* parameter declarations */
{ /* function body starts */
int l1; /* local variables */
l1=p1+p2;
return l1;
}
Here is an example of a function definition using prototypes.
char *func2 (void) /* new-style definition */
/* takes no parameters */
{
/* body */
}
int func3 (int p1, char *p2, ...) /* two declared parameters:
p1&p2*/
/* "..." specifies more,
undeclared parameters
of unspecified type */
{
/* body */ /* to access undeclared
parameters here, use the
functions declared in the
<stdarg.h> header file. */
}