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.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement