JavaScript Editor js editor     Web development 

Main Page

Returns a Numeric value from a Currency expression.




Specifies a Currency expression whose value MTON(В ) returns. mExpression must evaluate to a valid Currency value or Visual FoxPro generates an error. Currency values are created by placing a dollar sign ($) prefix immediately before a Numeric value.

Return Value

Numeric type. MTON(В ) returns a value of Numeric type with four decimal places.


The following example creates a currency type variable named gyMoney. TYPE(В ) displays Y, indicating the variable is a currency type. MTON(В ) is used to convert the variable to a numeric type, and TYPE(В ) now displays N, indicating the variable is a numeric type after the conversion.

В Copy Code
STORE $24.95 TO gyMoney  && Creates a currency type memory variable
? "gyMoney is type: "  
?? TYPE('gyMoney')  && Displays Y, currency type value

gyMoney = MTON(gyMoney)     &&  Converts gyMoney to a numeric value
? "gyMoney is now type: "  
?? TYPE('gyMoney')  && Displays N, numeric type value

See Also

JavaScript Editor js editor     Web development