RE: [AD] TRUE and FALSE

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Title: RE: [AD] TRUE and FALSE

> libs that use TRUE = 1 (but if the code's properly written (eg.
> "if(bool1&&bool2)" instead of "if(bool1==bool2)"), it shouldn't be a

Pedantically, these aren't equivalent even for 1 bit values.
Your second example would be if ((bool1&&bool2) || (!bool1&&!bool2))

Anyway, I don't see any improvement in moving TRUE from -1 to 1.
I would see an improvement in removing TRUE and FALSE altogether
however. Let then the user decide for the need to define one's own
macros if passing numbers as bools doesn't suit him or her.

--
Vincent Penquerc'h



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/