Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Variable argument lists. Message-ID: <7863@brl-smoke.ARPA> Date: 10 May 88 21:18:49 GMT References: <14139@brl-adm.ARPA> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 14 In article <14139@brl-adm.ARPA> bates%falcon.dnet%fermat@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.