Constants in conditionals, was Re: Are enums safe to use in portable code?

Henry Spencer henry at zoo.toronto.edu
Thu Feb 21 04:49:56 AEST 1991


In article <1424 at geovision.gvc.com> pt at geovision.gvc.com writes:
>Sorry, but #ifdef or #if is SOOO basic, that if you don't know how to use
>it (or refuse to for wierd reasons), you loose.

There are lots of good reasons to avoid using #if/#ifdef if humanly possible.
Just look at some of the code that comes out of the more enthusiastic #ifdef
factories if you don't believe me.  However, using constants in ifs does not
solve the problem; what is needed is a change in approach, not quibbling over
the exact syntax of the conditionals.
-- 
"Read the OSI protocol specifications?  | Henry Spencer @ U of Toronto Zoology
I can't even *lift* them!"              |  henry at zoo.toronto.edu  utzoo!henry



More information about the Comp.lang.c mailing list