[Gnucash-changes] r13919 - gnucash/trunk/src/engine/test-core -
Correctly ensure that the amount and value of test Splits
have the same sign
Derek Atkins
warlord at MIT.EDU
Tue May 9 10:27:08 EDT 2006
Chris Shoemaker <c.shoemaker at cox.net> writes:
> Hopefully C99's _Bool will eventually make my habit appear obsolete
> and paranoid. (or does glib already #define TRUE ((_Bool)1)?)
No, it just defines TRUE as 1.
If you really care, you could use:
if (!x == !y)
and then it doesn't matter what non-zero value you use for TRUE.
The xor is just... weird. And it still wont help you if you're
comparing 1 and 2. 1 ^ 2 is non-zero, but you would want to consider
them equivalent, whereas 0 ^ 0 is also non-zero.
> -chris
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel
mailing list