JavaScript Editor js editor     Web development 



Main Page

Returns a Currency value from a Numeric expression.

NTOM(nExpression)

Parameters

nExpression


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

Currency type. NTOM(В ) returns a value of Currency type with four decimal places.

Example

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

В Copy Code
STORE 24.95 TO gnNumeric  && Creates a numeric type memory variable
CLEAR
? "gnNumeric is type: "  
?? TYPE('gnNumeric')  && Displays N, numeric type value

gnNumeric= NTOM(gnNumeric)     &&  Converts gnNumeric to a currency value
? "gnNumeric is now type: "  
?? TYPE('gnNumeric')  && Displays Y, currency type value

See Also



JavaScript Editor js editor     Web development