Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Currency and the number of decimal places
Message
 
To
04/07/1999 19:31:41
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00237384
Message ID:
00237422
Views:
12
>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é
Previous
Reply
Map
View

Click here to load this message in the networking platform