ISNUMERIC
Use the ISNUMERIC script function to check if the characters of a string are numeric.
Syntax
ISNUMERIC (String)
Parameters
| Parameter | Description | Format |
|---|---|---|
| String | Character string that should be checked. | Script literal or script variable |
Return Codes
The script function returns the following codes:
- Y: The string is numeric.
- N: The string is not numeric.
Examples
The following two examples supply the return code Y as their result:
:SET &RET# = ISNUMERIC("123")
:PRINT &RET#
:SET &RET# = ISNUMERIC("00123")
:PRINT &RET#
In the following example, the string is not numeric and the return code N is supplied:
:SET &RET# = ISNUMERIC("1abc")
:PRINT &RET#
See also: