ContentsIndexPreviousNext

NUMVAL-C Function

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

Usage

FUNCTION NUMVAL-C (argument-1 [argument-2])

Parameters

1. Argument-1 must be a non-numeric literal or alphanumeric data item whose content has one of the following formats:

[space] [+] [space] [cs] [space] {digit [, digit] ... [. [digit]]} [space]
        [-]                      {. digit                        }

or

[space] [cs] [space] {digit [, digit] ... [. [digit]]} [space] [+ ] [space]
                     {. digit                        }         [- ]
                                                               [CR]
                                                               [DB]

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 a non-numeric value represented by argument-1.

5. If argument-2 is not specified, the character used for cs is the currency symbol specified for the program.

Returned Values

1. The returned value is the numeric value represented by argument-1.

2. The number of digits returned is 18.