Currency Data Type

Use the Currency data type instead of Numeric for monetary values. If you specify more than four decimal places in a currency expression, Visual FoxPro rounds to four places before evaluating the expression. For more information about the specifications for this type, see the tables of Data and Field Types.

To assign the Currency data type, use the dollar sign:

money = $50.33
moremoney = $675.43886

In the preceding example, the variable moremoney is internally rounded to 675.4389.

Currency fields respect system settings (such as SET CURRENCY) when displayed in Browse windows, fields, or when listed to the screen.

See Also

CREATE TABLE - SQL Command | Data and Field Types | Date Data Type | SET CURRENCY Command