Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug in currency data type? Someone Explain this one.
Message
De
20/07/2000 10:37:47
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Bug in currency data type? Someone Explain this one.
Divers
Thread ID:
00394894
Message ID:
00394894
Vues:
44
Hi,

I was getting a bad amount in a tax calculation and tracked it to the following:

*******************************************
t = 7.25

p = 65.31
? ROUND(p * (t/100), 2)

CORRECTLY returns 4.73


* now - with p as currency
p = $65.31
? ROUND(p * (t/100), 2)

INCORRECTLY returns 4.74!!!!
******************************************

what the heck is this all about?

thanks,
Ken
Ken B. Matson
GCom2 Solutions
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform