Partager via


NTOM( ) Function

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.

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

Reference

Currency Data Type

Numeric Data Type

MTON( ) Function

TYPE( ) Function

Other Resources

Functions