Skip to main content

Isnumeric

IsNumeric (Function)​

Format​

isnumeric ( expression )

return boolean_expression

Description​

The IsNumeric function returns true if the expression is an integer, a floating point number, or if it is a string that can be directly converted to a number. Otherwise it returns false.

The following Numeric strings are valid: “123”, “-345”, “234.234324”, “-34234.123”, “-2.567e7”, and “6.7888E-8”.

A string with spaces around the number, with a thousands separator, or with any other character in it is not numeric: “ 42”, “1,500” and “12abc” all return false. The empty string is not numeric either.

Example​

print isnumeric("12")
print isnumeric("1,5")
print isnumeric(3.5)

will display

1
0
1

See Also​

Abs, Acos, Asin, Atan, Ceil, Cos, Degrees, Exp, Float, Floor, Int, IsNumeric, Log, Log10, Radians, Rand, Round, Seed, Sin, Sqr, Tan

History​

1.99.99.20New To Version
2.3.2A string with another character where the decimal point could go, such as “1,5” or “1x5”, is no longer numeric