|
 |
Dick Balaska <dic### [at] buckosoft com> wrote:
: I have also seen #define TRUE ~FALSE
This is horrible. It doesn't work!
Suppose we have:
#define FALSE 0
#define TRUE ~FALSE
Then TRUE will be -1 (ie. all bits set).
Now suppose we want to add a "boolean" type:
typedef int BOOL;
This will NOT work as it should:
int x=2, y=2;
BOOL b;
b = (x==y);
if(b == TRUE)
puts("Equal");
else
puts("Different");
This will print "Different" although x and y are equal.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
 |