Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rounding when not wanted
Message
 
À
26/05/2005 00:32:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP1
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01017554
Message ID:
01017774
Vues:
24
Yes, with currency calculations you need to be careful. As it is in VFP9 Help for currency data type:
*--------------------
If you specify more than four decimal places in a currency expression, Visual FoxPro rounds to the expression to four places before evaluating the expression.
*-------------

And for your example:
$5000.00 * 0.01099 = 55.00.

But:
$5.00 * 10.99 = 54.95
$5000.00 * 10.99 * 10^(-3)= 54.95



>Sorry.
>It happens when the data is currency (Y).
>
>Like $5000.00 * 0.01099 = 55.00.
>
>Thanks.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform