&IS-NUMERIC

Examines an argument and returns 1 if the argument contains valid numeric characters, as follows; otherwise, returns 0.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.
  • Optional + or - in the first position
  • Digits 0-9 in any position

Syntax:

&IS-NUMERIC (&variablename)

Aliases:

&is-numeric (&variablename) &Is-Numeric (&variablename)
&isnumeric (&variablename)  &IsNumeric (&variablename)
&ISNUMERIC (&variablename)

Comments:

  • A return value 1 lets you store the argument as a numeric type.
  • Note that the &NUMERIC function tests only whether the argument is of numeric type (internal storage format).

Examples:

&IS-NUMERIC ("123")       = 1
&IS-NUMERIC ("+123")      = 1
&IS-NUMERIC ("-123")      = 1
&IS-NUMERIC ("123-")      = 0
&IS-NUMERIC ("123.")      = 0
&IS-NUMERIC (123)         = 1
&IS-NUMERIC (0)           = 1
&IS-NUMERIC (-123)        = 1
&IS-NUMERIC ("123A")      = 0
&IS-NUMERIC ("")          = 0