Mail Archives: djgpp/1996/06/02/12:04:36
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_
- Raw text -