The NUMVAL-F function returns the numeric value represented by the alphanumeric character string or national character string
specified by argument-1. Leading or trailing spaces in the string are removed from the resulting numeric value.
The type of the function is numeric.
General Format
Arguments
- argument-1 must be an alphanumeric or national literal, or a data item of class type alphanumeric or national that conforms to the following
format:
>>-.-------.--.-----.--.-------.--.-digit-.--------------.-.--->
+-space-+ +- + -+ +-space-+ | +-.--.-------.-+ |
+- - -+ | +-digit-+ |
+-.--digit---------------+
>--.-------.--------------------------------------------------->
+-space-+
>--.-------------------------------------------------------.---><
+-E--.-------.--.- + -.--.--------------.--n--.-------.-+
+-space-+ +- - -+ +-space-string-+ +-space-+
where:
- space
- A string of one or more spaces.
- digit
- A string of one or more digits. If the exponent clause is specified, the mantissa must not exceed 16 digits.
- n
- The exponent value, which is a 1-4 digit-string.
- E
- If
argument-1 is alphanumeric, E must be either an uppercase or lowercase E character; if
argument-1 is national, E must be either an uppercase or lowercase E national character.
If the DECIMAL-POINT IS COMMA clause is specified in the SPECIAL-NAMES paragraph, you must specify a comma in
argument-1, and not a decimal point.
Returned Values
- The returned value is a floating-point approximation of the numeric value represented by
argument-1.