I thought about this, and is definitely easier, but then arise the issues of
converting cents to dollars with decimals - has anyone written routines (or
have some pointers) on how to reliably do this? I need to read dollar
amounts from fields, multiply by quantity, add or subtract from order
totals, etc.

If I did decide to stick with floats, can you think of why my double is
capping off at 32,768?

Thanks,
Jason


Peter Epstein <[EMAIL PROTECTED]> wrote in message
news:57104@palm-dev-forum...
>
> This is a well worn topic, so check the archives for more info. Using any
> floating point type to store dollar amounts is inadvisable. Probably best
to
> think of the amount as a measure in cents rather than dollars, and use
> integers to store it. If the dollar values can all be assumed to be
> positive, then a UInt16 would give you up to $655.35. If that's not
enough,
> a UInt32 should be more than adequate. If you need to handle negative
> values, go for a signed integer type like Int32.
> -
> Peter Epstein
>
>



-- 
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