Varargs in C - (nf)

Andrew Koenig ark at rabbit.UUCP
Thu Aug 30 03:50:11 AEST 1984

Perry (convex!smu!ppedz) proposes a way of handling variable
argument lists that he says is better than <varargs.h> because
it allows a stack frame to be passed to a subroutine.  Well,
so does <varargs.h>!  It is permissible to say, for example:

	#include <varargs.h>

	f (va_alist) va_dcl
		va_list args;
		va_start (args);
		g (&args);
		va_end (args);

	g (a) va_list *a;
		int arg1;
		arg1 = va_arg (*a, int);

<varargs.h> does not have any way of finding out the number
of arguments because it is extremely difficult to do that
in some implementations.

More information about the Comp.lang.c mailing list