Script Function: Checks if a string is numeric
ISNUMERIC(String)
Syntax |
Description/Format |
---|---|
String |
Character string which should be checked |
Return codes |
---|
"Y" - the string
is numeric |
With this script function, you can check whether or not all characters of a String are numeric.
Both of the examples shown below supply the result "Y".
:SET &RET#=ISNUMERIC("123")
:PRINT &RET#
:SET &RET#=ISNUMERIC("00123")
:PRINT &RET#
In the following example, the string is not numeric and value "N" is returned.
:SET &RET#=ISNUMERIC("1abc")
:PRINT &RET#
See also:
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function