Luiz Paulo Gama Barreto wrote:
> I'm wondering about the best format to work with currencies.
> It would be a float format?  Or maybe work with the values in cents, in a ULong 
>format, as mentioned in the Palm Programming Guide?

Working with cents in a ULong format is usually the best approach, as
you then don't have to worry about floating point rounding errors, etc. 
However, keep in mind that this limits your maximum amount to the
largest value that can be stored in a ULong; that is, $42,949,672.95. 
For many (but not all) applications, this is sufficient.  If there's any
possibility that your app might deal with amounts larger than this,
you'll need to use a different approach.
--Mark

Reply via email to