FALSE and TRUE (Sorry, I did mean TRUE = -1?)

Alan Grant Finlay alanf at bruce.cs.monash.OZ.AU
Tue Sep 11 14:55:01 AEST 1990


My suggestion of FALSE = -1 is clearly ludicrous.
The reason for the mistake is that I don't actually need to know the values
the mnemonics stand for.  Hence I was confused and got it around the wrong
way.  Since zero is used for false and any non zero for true (in conditional
statements), what I meant was TRUE = -1.
             --------------------------

The point is that the logical operators in C: ||, &&, and ! are designed to
allow any non zero value to represent TRUE.  



More information about the Comp.lang.c mailing list