Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with currency fields
Message
From
15/11/2001 03:21:56
Bruno Maddalozzo
Informatica Aziendale
Arsie, Italy
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Problem with currency fields
Miscellaneous
Thread ID:
00581922
Message ID:
00581922
Views:
67
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
Next
Reply
Map
View

Click here to load this message in the networking platform