Variable argument lists.

Doug Gwyn gwyn at brl-smoke.ARPA
Wed May 11 07:18:49 AEST 1988


In article <14139 at brl-adm.ARPA> bates%falcon.dnet%fermat at bru.mayo.edu (Cary Bates) writes:
>       Does anybody know (or care) why in ANSI standard C when 
>       using a variable length argument list, there is no way to 
>       determine how many arguments where passed into the function?
>       Without such a feature it seems to me that the most of the 
>       power of the variable argument list is wasted.  In VAX C there
>       is a macro called va_count.  Why is such a macro missing
>       from the ANSI standard?   

Requiring support for this on all functions, or even just on all
variadic functions, would add overhead that is complete waste for
the majority of applications.  There is nothing (except possibly
laziness) that keeps you from passing an explicit argument count
as the first parameter.



More information about the Comp.lang.c mailing list