At 2:40 PM -0500 11/28/00, Paul Nevai wrote:
>Suppose I use C in CW and I have
>
>UInt32 a, b;
>
>How can I determine if "a" and "b" are "huge" then (a + b) is not beyond
>0xFFFFFFFFF [max UInt32]?

You could add them together and check that the result is larger than 
both a and b individually. If it's not, then the the result hit the 
max and rolled over...

I'm sure there are other ways, this just popped into my head.

Dave Johnson
-- 
"First, be a good animal." - Robert Frost

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to