Xref: news2.mv.net comp.os.msdos.djgpp:4458 From: Tom Wheeley Newsgroups: comp.os.msdos.djgpp Subject: RE: printf("%s",0) - Segmentation fault Date: Sat, 01 Jun 96 23:22:21 GMT Organization: City Zen FM Lines: 24 Message-ID: <833671341snz@tsys.demon.co.uk> References: <01BB4FB0 DOT 9776BC00 AT vessers DOT mpce DOT mq DOT edu DOT au> Reply-To: tomw AT tsys DOT demon DOT co DOT uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article <01BB4FB0 DOT 9776BC00 AT vessers DOT mpce DOT mq DOT edu DOT au> vessers AT mpce DOT mq DOT edu DOT au "Victor R. Essers" writes: > 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. NULL is defined to be 0 in the context of pointers. (of course internally a NULL pointer almost never is 0, but this is getting too close to c.l.c) Personally, always choose your method as it reads well in my mind. (For numbers and pseudobooleans too). ..splitbung -- * TQ 1.0 * The 'Just So Quotes'. "I'm a Leo. Leos don't believe in this astrology stuff." -- Tom Neff