>>Dear VFP Mavens -
>>
>>I'm trying to understand why one would use a currency type field instead of a numeric. We have a situation which might require 5 decimal places and currency only goes to 4. I know there has to be an upside to currency vs. numeric ... could someone explain it to me?
>>
>>Thanks loads in advance!
>>
>>-- John Kiernan
>
>More places on the OTHER side of the decimal. Currency type is for big numbers. Also, the "new numeric" types are stored more efficiently than xBase Numeric type. They're actually stored as numbers, not ASCII representation of numbers.
Even more precisely, the currency type is stored as an 8-byte integer (AFAIK), which only gets divided or multiplied with 10000 as necessary to keep the phantom decimal poind in position, when these numbers are multiplied or divided. All other numbers in VFP are stored as IEEE numbers in memory, or as integer, float or ASCII representations in tables. This should provide vast speed in most of the arithmetics. Of course, if this arithmetics involves other numeric types, we're getting into conversions, which nullifies some of the speed gain.