Click or drag to resize

NToM Function

X#
Returns a Currency value from a Numeric expression.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION NToM(
	nExpression AS FLOAT
) AS CURRENCY
Request Example View Source

Parameters

nExpression
Type: Float
Specifies a numeric expression whose Currency value NToM( ) returns. If nExpression has more than four decimal places, it is rounded to four decimal places. If nExpression has less than four decimals places, it is padded with zeros until four decimal places are created.

Return Value

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