Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Currency and the number of decimal places
Message
 
À
04/07/1999 19:31:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00237384
Message ID:
00237422
Vues:
14
>VFP put 4 decimal places for all currency type feilds. Is there a way for me to set it to 2 in one place and have it work all through my application. How are other programmer tacking this?
>
>Thanx for ur input.
>Gnana

Gnana,

There are several things to watch out: you have SET DECIMALS (watch out, it's scoped to the datasession), and/or you can also use the format properties for your textboxes. With this you can make sure that the input is always two decimals. Now if you want your calculations to be exactly two decimals, you have the ROUND() function. I've seen strange problems with the ROUND() function and you should be able to retrieve interesting information by doing a search on the messages. I resorted to a home made ROUND function.

José
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform