|
![](/i/fill.gif) |
On Wed, 02 Aug 2000 11:50:45 -0400, Dick Balaska wrote:
>Warp wrote:
>
>> Nope. In C a true value is 1 (for example the result of the sentence a==b
>> is 1 if a is equal to b, else 0). When testing a conditional, any value
>> other than 0 is considered true, and 0 is considered false.
>
>Your definition is wrong, but your example is correct. :)
>
>False is 0. True is not false.
>1 is a true value, as is 2, as is -1.
>
>I have seen #define TRUE 1
>I have also seen #define TRUE ~FALSE
I prefer #define TRUE (1==1) and #define FALSE (1==0)
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
![](/i/fill.gif) |