IsNumeric function (LotusScript® Language)

Tests the value of an expression to determine whether it is numeric, or can be converted to a numeric value.

Syntax

IsNumeric ( expr )

Elements

expr

Any expression.

Return value

The IsNumeric function returns TRUE (-1) if the value of expr is a numeric value or can be converted to a numeric value. The following values are numeric:

  • Integer
  • Long
  • Single
  • Double
  • Currency
  • Date/Time
  • EMPTY
  • String (if interpretable as number)
  • OLE error
  • Boolean (TRUE, FALSE)

If expr is not a numeric value and cannot be converted to a numeric value, IsNumeric returns FALSE (0). The following values are not numeric:

  • NULL
  • Array
  • List
  • Object (OLE Automation object, product object, or user-defined object)
  • String (if it cannot be interpreted as number)
  • NOTHING

Usage

A common use of IsNumeric is to determine whether a Variant expression has a numeric value.

Example