Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object values and decimals
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00313640
Message ID:
00313650
Vues:
32
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform