Path: utzoo!attcan!uunet!husc6!bloom-beacon!gatech!mcnc!rti!sas!bts From: bts@sas.UUCP (Brian T. Schellenberger) Newsgroups: comp.lang.c Subject: Re: Variable argument lists. Message-ID: <504@sas.UUCP> Date: 13 May 88 20:06:16 GMT References: <14139@brl-adm.ARPA> Reply-To: bts@sas.UUCP (Brian T. Schellenberger) Organization: SAS Institute Inc, Cary NC Lines: 28 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. Because it is not possible to do so on many architectures, including lots of Unices. In fact, it is not possible to determine this information with the standard Unix varargs, either. And printf et al have gotten along for years without the capability. K&R (orig) say: printf, the most common C function with a variable number of arguments, uses information from the first argument to determine how many arguments are present . . . It fails badly if the caller does not supply enough arguments. So, in short, if VMS supplies this capablity, enjoy it. But the rest of the world has gotten along without it all these years, and seems to have survived just fine. Thus, I seriously doubt that it "most of the power of the variable argument list is wasted." -- _______________________ __Brian___________________ |Brian T. Schellenberger| "The Earth is but one | ...!mcnc!rti!sas!bts | |104 Willoughby Lane | country, and Mankind its |work: (919) 467-8000 x7783| |Cary, NC 27513 | citizens" --Baha'u'llah |home: (919) 469-9389 |