Path: utzoo!utgpu!attcan!uunet!husc6!bloom-beacon!spdcc!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: variable number of strings passed to function - how? Message-ID: <9862@haddock.ima.isc.com> Date: 21 Oct 88 20:17:39 GMT References: <434@tutor.UUCP> <3533@ihuxz.ATT.COM> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 18 In article <3533@ihuxz.ATT.COM> burris@ihuxz.ATT.COM (Burris) writes: >In the C language arguments are placed on the stack in reverse order This is not true in general. > string_func( "what", "why", "where", NULL ); In order for this to always work right, the NULL must be explicitly cast: (char *)NULL or (char *)0 are the two correct ways to write it. (Don't followup to say you don't believe this. Ask Chris Torek (mimsy!chris) to mail you the NULL article from his Frequently Asked Questions archive.) >The examples assume that the stack grows in a negative direction. If you write it with /, you don't need to make that assumption. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint