MTON( ) Function Example

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.

STORE $24.95 TO gyMoney  && Creates a currency type memory variable
CLEAR
? "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