Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Currency Field Type
Message
From
20/05/2004 22:46:03
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
20/05/2004 22:34:27
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00905874
Message ID:
00905891
Views:
34
>Great info!
>I'll be using the field for currency (ex GST values) which require 3 decimal places to be sufficiently accurate under Australia law. It certainly saves some space in the tables compared to N(13,3).

I am curious, how many decimals do you use in normal situations?

You also have the option of double fields. But here you can have rounding errors, whereas currency should be accurate (up to the supported size), for addition and subtraction. For multiplication and division, results will be rounded, of course.

Actually, especially if you work with money, the fact that currency has a greater accuracy for addition and subtraction might be even more important than the space you save.

I also use type "currency" for non-monetary amounts, when I need four decimals or less, to save space as you said. Mainly, product quantities, when I need decimals, but not more than 4 - this was usually the case in material purchases/inventory, in Bata/Bolivia.

In the rare cases where more decimals where required, we switched units (for example, do calculations in gram instead of kg.). Permitting more decimals would not only have required a change in the data type; it would also have upset lots of reports.
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
Next
Reply
Map
View

Click here to load this message in the networking platform