Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with currency fields
Message
De
15/11/2001 03:21:56
Bruno Maddalozzo
Informatica Aziendale
Arsie, Italie
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Problem with currency fields
Divers
Thread ID:
00581922
Message ID:
00581922
Vues:
69
Please try this piece of code:
CREATE CURSOR Temp (QtaOrdUMI1 Y, Coeff	N(13,6))
APPEND BLANK
REPLACE ;
	QtaOrdUMI1 WITH 1068.0000, ;
	Coeff	   WITH 0.007380

? QtaOrdUMI1 * Coeff		&&you get 7.9032  WRONG!!
? 1068.0000 * 0.007380		&&you get 7.881840000 CORRECT!!

REPLACE ;
	QtaOrdUMI1 WITH 1000.0000
? QtaOrdUMI1 * Coeff		&&you get 7.4000  WRONG!!
I realize that VFP, before multiplaying other fields type (Coeff - Numeric) with currency fields (QtaOrdUMI1),
transform the Numeric type into currency type (4 decimals). The fact modifies the result.
Is this normal?
Is there a way to override this behaviour?
TIA
Bruno Maddalozzo
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform