Previous Topic Next topic Print topic


ANS85 

The NUMVAL-C Function

The NUMVAL-C function returns the numeric value represented by the character string specified by argument-1. Any optional currency string specified by argument-2 and any optional commas preceding the decimal point are ignored. The type of this function is numeric.

General Format


*

Arguments

  1. Argument-1 must be an alphanumeric

    MF or national

    literal or an alphanumeric

    MF or national

    data item whose content has one of the following two formats:


    *

    or


    *

    where space is a string of zero or more spaces, cs is the string of one or more characters specified by argument-2 and digit is a string of one or more digits.

  2. If the DECIMAL POINT IS COMMA clause is specified in the Special-Names paragraph, the functions of the comma and decimal point in argument-1 are reversed.
  3. The total number of digits in argument-1 must not exceed 18.
  4. Argument-2, if specified, must be of the same class as argument-1.

    It cannot be a digit, comma, space, plus sign(+), minus sign (-) or decimal point.

  5. If argument-2 is not specified, the character used for cs is the currency string specified for the program when argument-1 is of class alphanumeric

    MF ; or if argument-1 is of class national, the national representation of the currency string specified for the program. The national representation of cs is the value returned from FUNCTION NATIONAL-OF (cs).

Returned Values

  1. The returned value is the numeric value represented by argument-1.
  2. The number of digits returned is 18.
  3. Floating-point format is used for numeric non-integer results.
Previous Topic Next topic Print topic