ISO2002ENTMF 

The TEST-NUMVAL-F Function

The TEST-NUMVAL-F function verifies that the contents of argument-1 adheres to the specification for the NUMVAL-F function.

The type of the function is integer.

General Format

Arguments

  1. argument-1 must be an alphanumeric or national literal, or a data item of class type alphanumeric or national.

Returned Values

  1. If the value of argument-1 adheres to the rules specified by the NUMVAL-F function, the value 0 is returned.
  2. If one or more characters in argument-1 do not adhere to the specification, the value of the first character in error is returned.
    Note: If a string of numeric characters contains one or more spaces, the returned value is the position of the first non-space character following the spaces, because one or more spaces following one or more digits is valid. For example, if argument-1 is '0 1', the returned value will be 3. If the exponent value in the argument contains more than four significant digits, the returned value is the position of the fifth digit of the exponent.
  3. If neither of these states are true, the returned value is (FUNCTION LENGTH (argument-1) +1). Such circumstances that could cause this value are:
    • argument-1 is zero-length.
    • argument-1 contains only spaces.
    • argument-1 contains valid characters but is incomplete.