Note that the Palm is accurate up to 8 digits.  The fixed point math
technique works well, but you can get less than 8 digits accuracy when you
need to multiply by a factor of 1000.

--Mike Y.

-----Original Message-----

Abraham,

One technique would be to use fixed point math.  That is multiply the
input values by a factor, do the math, and then divide by the same
factor prior to display.  If you need 3 decimal places, the factor would
be 10^3 or 1000.

The only difficult part here is converting the character string from the
field into an integer (or long).  One approach would be to grab the
digits leading up to the decimal point, multiply by 1000, and then add
the three digits following the decimal point.  You will probably want to
use StrAToI to convert the string to an integer, StrIToA to convert
back, and StrPrintF to format the string for display.


Paul . . .


--
___________________________________________________________________
  dpw Designs                    http://www.pe.net/firm/dpw-designs
                                 mailto:[EMAIL PROTECTED]


Reply via email to