> Lots of neat ideas here!!
> Might as well offer mine:
:))
> convert a,b to their % of 0xFFFFFFFFF, add the two together, if the
> result is greater than 100% then error.
using '%' may be confused with modulus, but essentially, it ends up
being something similar to another technique i thought of too:
if (((a >> 1) + (b >> 1)) & 0x8000000) {
}
which will basically remove the least sig. bit (shift right by 1)
and hence you add together, it wont overflow.. however, an overflow
can be determined by checking if the most significant bit is set.
> Give 20 programmers 1 problem and you'll have 20 different solutions
> :)
of course :)) thats what makes programming fun :P
// az "thou shall not sleep tonight"
[EMAIL PROTECTED]
http://www.ardiri.com/ <--- free games!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/