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.


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


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]]}
  [-] {. digit }


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

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.

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.

The total number of digits in argument-1 must not exceed 18. If your program has been compiled for 31-digit support (-Dd31), argument-1 must not exceed 31.

argument-2 If specified, must be a non-numeric value represented by argument-1. 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. NUMVAL-C returns a 64-bit floating point value (normally 16 digits) and a 128-bit floating point value when compiled for 31-digit support ("-Dd31").