Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!decvax!ucbvax!pasteur!ames!nrl-cmf!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: variable number of arguments Message-ID: <7361@brl-smoke.ARPA> Date: 28 Feb 88 00:45:10 GMT References: <1608@byzantium.UUCP> <1632@mhres.mh.nl> <51@vsi.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 11 Keywords: arguments, varargs In article <51@vsi.UUCP> friedl@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 macros, where there MUST be at least one "anchor" argument declared right before the variadic part.)