TRUE and FALSE

Christopher R Volpe volpe at underdog.crd.ge.com
Tue Aug 28 22:11:39 AEST 1990


In article <2316 at cirrusl.UUCP>, dhesi%cirrusl at oliveb.ATC.olivetti.com
(Rahul Dhesi) writes:
|>
|>When I find somebody who really, really, really wants to define TRUE
|>and FALSE, even somebody who uses them for assignment only, I recommend
|>the following defines instead:
|>
|>     #define ZERO   0
|>     #define ONE    1
|>

Ugh. Those say nothing. They don't hint to the boolean nature of the
variables being assigned to. They're as useless as the comments in
the following code:

   main()
   {
     int i; /* declare variable i */
     i=0; /* assign zero to i */
     while (!EOF) { /* while not end of file */
       i=i+1; /* increment i by one */
       if (i>100) /* if i is greater than 100 */
         i=0; /* then reset i to zero */
     }
   }
                 
==================
Chris Volpe
G.E. Corporate R&D
volpecr at crd.ge.com



More information about the Comp.lang.c mailing list