ContentsIndexPreviousNext

NUMVAL Function

The NUMVAL function returns the numeric value represented by the character string specified by argument-1. Leading and trailing spaces are ignored. The type of this function is numeric.

Usage

FUNCTION NUMVAL (argument-1)

Parameters

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

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

or

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

where space is a string of zero or more spaces, and digit is a string of one to 18 digits.

2. The total number of digits in argument-1 must not exceed 18.

3. If the DECIMAL-POINT IS COMMA clause is specified in the SPECIAL-NAMES paragraph, a comma must be used in argument-1 rather than a decimal point.

Returned Values

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

2. The number of digits returned is 18.