Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object values and decimals
Message
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00313640
Message ID:
00313650
Views:
33
Ken,

set decimals to 2
set fixed on
x = 1.23456
x = x / 0.9
? x && prints 1.37
? x = 1.37 && prints .f.
set decimals to 3
? x && prints 1.372

If you really want to clip calculations to 2 decimal places wrap the round(,2) function around the calc.

x still has a ton more decimal precision that what
>My form has objects containing numeric values and are used for simple math calculations (mostly addition - eg: invoice total + sales tax = grandtotal). Some of the values are holding 4 decimal places even though I have Set Deci to 2 and set fixed on. The format and input mask is '9,999.99'.
>Any ideas on how to solve this problem
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform