Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Currency / Numeric
Message
From
27/11/2002 19:38:47
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
27/11/2002 13:45:37
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00727690
Message ID:
00727824
Views:
8
>What are the pros and cons in using Currency instead of numeric type fields?
>The fields will be used to store money amounts with 2 digits (example: price 9999999999.99, total 99999999999.99 etc.) Precision of 2 digits is sufficient.
>Are there other benefits in choosing Currency fields besides the less space required for storing the data?
>Are there any global settings to instruct currency fields to displace and print 2 digits instead of 4 that is the default?
>
>Thanks

Saving space is enough advantage by itself. You can have some problems with calculations - in some cases, it is advisable to convert to numeric with the mton() function. When automating Excel, you definitely want to convert with mton(), to avoid displaying the numeric sign, in most cases.

I use currency a lot, and didn't have major problems. No, I don't know about a global setting. However, you can create your class "MyCurrency", base it on TextBox, and give it an appropriate InputMask.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform