variable number of strings passed t

mcdaniel at uicsrd.csrd.uiuc.edu mcdaniel at uicsrd.csrd.uiuc.edu
Fri Nov 4 16:37:00 AEST 1988


Written 11:08 am  Oct 31, 1988 by crossgl at ingr.UUCP in comp.lang.c:
> Wouldn't it be much nicer to be able to call the function with the
> single line 
>	yourfunction ("arg1", "arg2", ... , 0);
> Gordon Cross
> Intergraph Corp.  Huntsville, AL

Yes, it would be nice if you could do that.  However, the line as
given above is erroneous (although likely to work in many
implementations).  Either
	yourfunction ("arg1", "arg2", ... , (char *) 0);
or
	yourfunction ("arg1", "arg2", ... , (char *) NULL);
works.  If you don't believe me, I'll e-mail you a copy of Chris
Torek's articles "Why NULL is 0" and "Re: NULL etc.", the definitive
works on the subject.

-- 
Tim, the Bizarre and Oddly-Dressed Enchanter
Center for Supercomputing Research and Development
at the University of Illinoid at Urbana-Champaign

Internet, BITNET:  mcdaniel at uicsrd.csrd.uiuc.edu
UUCP:    {uunet,convex,pur-ee}!uiucuxc!uicsrd!mcdaniel
ARPANET: mcdaniel%uicsrd at uxc.cso.uiuc.edu
CSNET:   mcdaniel%uicsrd at uiuc.csnet
DECnet?: GARCON::"mcdaniel at uicsrd.csrd.uiuc.edu"



More information about the Comp.lang.c mailing list