Click or drag to resize

MToN Function

X#
Returns a Numeric value from a Currency expression.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.21
Syntax
 FUNCTION MToN(
	mExpression AS CURRENCY
) AS FLOAT
Request Example View Source

Parameters

mExpression
Type: Currency
Specifies a Currency expression whose value MToN( ) returns. mExpression must evaluate to a valid Currency value or X# generates an error. Currency values are created by placing a dollar sign ($) prefix immediately before a Numeric value.

Return Value

Type: Float
Numeric type. MToN( ) returns a value of Numeric type with four decimal places.
Examples
X#
1STORE $24.95 TO gyMoney  // Creates a currency type memory variable
2CLEAR
3? "gyMoney is type: "
4?? Type('gyMoney')  // Displays Y, currency type value
5gyMoney = MToN(gyMoney)     //  Converts gyMoney to a numeric value
6? "gyMoney is now type: "
7?? Type('gyMoney')  // Displays N, numeric type value
See Also