TRUE and FALSE
Peter da Silva
peter at ficc.ferranti.com
Wed Sep 5 06:23:37 AEST 1990
In article <2341 at cirrusl.UUCP> dhesi%cirrusl at oliveb.ATC.olivetti.com (Rahul Dhesi) writes:
> i = isdigit(c);
> ...
> if (i == TRUE) ...
I would never do !if (anything == TRUE)! or !if (anything == FALSE)!. Not
only is it redundant, but it obscures the meaning of the code. If you have
a boolean-valued variable, it's clearer to say !if (anything)! or, for that
matter, !if (!anything)!.
The only think I use TRUE and FALSE for is:
boolean = TRUE;
return TRUE;
function(..., TRUE, ...);
--
Peter da Silva. `-_-'
+1 713 274 5180. 'U`
peter at ferranti.com
More information about the Comp.lang.c
mailing list