variable number of arguments

Doug Gwyn gwyn at brl-smoke.ARPA
Sun Feb 28 10:45:10 AEST 1988


In article <51 at vsi.UUCP> friedl at vsi.UUCP (Stephen J. Friedl) writes:
>     I have no specific reason to doubt the portability, but it
>strikes me that since args are so crazy on various machines (stack
>grows up, stack grows down, params passed in registers, etc.)
>that letting varargs handle *all* the details would not be a bad
>idea.

In fact that's the right way to use varargs.  Declaring part of
the argument list is the wrong way.  (This is the opposite of
ANSI C <stdarg.h> macros, where there MUST be at least one
"anchor" argument declared right before the variadic part.)



More information about the Comp.lang.c mailing list