Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.lang.c
Subject: Re: Variable length argument list handling
Message-ID: <10775@smoke.BRL.MIL>
Date: 18 Aug 89 21:50:51 GMT
References: <1441@esunix.UUCP>
Reply-To: gwyn@brl.arpa (Doug Gwyn)
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 16

In article <1441@esunix.UUCP> bjones@esunix.UUCP (Ben Jones) writes:
-Question:  Why can't a C function which allows a  variable  number  of
-arguments find out how many arguments were actually passed?  ...
-ANSI C does not change any of the function  calling  conventions.   It
-cannot  or  else existing function libraries would be invalidated when
-switching to ANSI C.

You answered your own question.

-Therefore, it would appear that the best way to get  the  length of
-the argument list is to add a new reserved word to the language to
-handle variable parameter lists.

X3J11 thought that the best way was to give a function that needed
that information an extra parameter containing it, when you design
its interface.