TEST-NUMVAL-C
The TEST-NUMVAL-C function verifies that the argument conforms to the argument rules for the NUMVAL-C function.
Syntax 1
function test-numval-c (arg-1) |
Syntax 2
Arguments
• arg-1 must be an alphanumeric data item or literal.
Result
The function returns 0 if the argument conforms to the argument rules for the NUMVAL-C function. Otherwise, the function returns the position of the first character in error.
Examples
Example - Test if a string is suitable for the NUMVAL-C function.
working-storage section. 77 wrk-str pic x(20) value "$1,234.99". ... procedure division. ... if function test-numval-c(wrk-str) = 0 display wrk-str " is suitable for the numval-c function" else display wrk-str " is not suitable for the numval-c function" end-if. |