Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Forcing to a higer precision
Message
 
 
To
18/12/2002 17:32:24
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00734294
Message ID:
00734301
Views:
17
>I'm making a divide operation between two currency variables and an integer:
>
>lnResult = lnCurrency1 / lnInteger / lnCurrency2
>
>No matter how I group this operation, the result gives me acurrency result with a precision of 4 decimals.
>
>Due to the nature of the numbers I'm handling, and the volume of the data being handled, I´m loosing some significant amounts.
>
>How can I get a higer precision number with at least 6 decimal places?
>
>Thanks in advance for any hints.
>

Oscar,
The currency data type is limited to 4 decimal places. If you want larger precision, convert it before you perform the operation using the MTON (money to number) function.

Ex.
lnResult = mton(lnCurrency1) / lnInteger / mton(lnCurrency2)

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform