Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data types: Currency vs Numeric?
Message
From
29/07/1998 09:09:01
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapore
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00120115
Message ID:
00122262
Views:
24
There is one advantage of using 4 dec places currency. Your sum result will be more accurate. You can also use numeric with 4 dec places but more memory will be used. This may be important for some applications.


>>>I'm working on developing an app that has a lot of different monetary calculations and fields. In FoxPro 2.x I always used Numeric and I was going to do the same here when I remembered the Currency type. However, the VFP documentation doesn't give much usefull info regarding this data type, so I would be grateful for some insight as to what the benefits, if any, there are to using Currency instead of Numeric. TIA
>>
>>Colin,
>>
>>The single major advantage of currency over numerioc is that currency can store values from – 922337203685477.5808 to 922337203685477.5807 in 8 bytes. Those values would require 20 bytes as numeic. Other than that there is very luittle difference, beside of course that currency has a fixed decimal length of 4. But you can format the display to any number of decimals up to 4.
>
>Thanks for the input Jim. Based on the fact that these monetary values will be small and not calculation intensive I decided to just use numeric.
Previous
Reply
Map
View

Click here to load this message in the networking platform