Share via


Currency Data Type

For monetary values or precise financial calculations, use the Currency data type instead of Numeric.

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

money = $50.33
moremoney = $675.43886

If you specify more than four decimal places in a currency expression, Visual FoxPro rounds to the expression to four places before evaluating the expression. In the 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.

For more specifications about the Currency data type, see Visual FoxPro Data and Field Types.

See Also

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