Xref: news2.mv.net comp.os.msdos.djgpp:4470 From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: printf("%s",0) - Segmentation fault Date: Sat, 01 Jun 1996 14:43:21 -0700 Organization: Alcyone Systems Lines: 20 Message-ID: <31B0B979.12AED2E3@alcyone.com> References: <01BB4FB0 DOT 9776BC00 AT vessers DOT mpce DOT mq DOT edu DOT au> NNTP-Posting-Host: newton.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Victor R. Essers wrote: > Oh, come on! Why not: > > (pp ? "" : pp) > > I've never seen any C implementation that treats NULL as something other > than 0, so the above code is much more elegant. Elegance is in the eye of the beholder. (I personal prefer the method you outline, as well; I never use the NULL macro in my programs.) However, both mechanisms are supported under ANSI C. -- Erik Max Francis &tSftDotIotE && http://www.alcyone.com/max && max AT alcyone DOT com San Jose, California, U.S.A. && 37 20 07 N 121 53 38 W && the 4th R is respect H.3`S,3,P,3$S,#$Q,C`Q,3,P,3$S,#$Q,3`Q,3,P,C$Q,#(Q.#`-"C`- && 1love && folasade Omnia quia sunt, lumina sunt. && Dominion, GIGO, GOOGOL, Omega, Psi, Strategem "Out from his breast/his soul went to seek/the doom of the just." -- _Beowulf_