TRUE and FALSE

Christopher R Volpe volpe at underdog.crd.ge.com
Fri Aug 31 03:16:00 AEST 1990


I wouldn't use TRUE and FALSE in comparisons such as if (x==TRUE)
for the reasons Chris Torek outlined, but I think they are useful
for setting default values, e.g. "int expert_mode = TRUE;".

For tests, if you want the extra clarity, how about the following:
#define TRUE(x) (x)
#define FALSE(x) (!(x))

and then do things like " if (FALSE((x==y) && (x==z)) || whatever) ..."
==================
Chris Volpe
G.E. Corporate R&D
volpecr at crd.ge.com



More information about the Comp.lang.c mailing list