[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: FALSE == 1



> >  +#define FALSE   ((int) 1)
> >  +#define TRUE    ((int) 0)
> 
> This is contrary to usual logic which says that
> 
> if (3>2) { 
>   whatever
> }

Yes, I'm quite aware this is "contrary to usual logic" that's why I
posted in the first place.

> Why not change the "wrong" definitions of TRUE and FALSE in whatever place
> they are found, instead of propagating this madness even more?

I don't consider that I've propagated anything, these definitions exist
and have existed for some time. My intention was to highlight these
undesirable definitions so that others will not fall foul of them as I
did. While I could easily change these brain damaged definitions, I
don't have the time to fix and test any misguided logic that may
dependant on them.

I hope the original author of these definitions takes no offence, as I
feel sure that no sane 'C' programmer would have coded them arse-about-face
deliberately.

Nick

----------------------------------------------------------------
Nick Holgate <holgate@debian.org>
GPG key from public servers : Key ID FD9C18AF
Fingerprint = 9DCA EDEA D5C5 57DA 23F3  1A2B 2273 5645 FD9C 18AF



Reply to: