&IS-DECIMAL

Determines whether the variable contains the following valid numeric characters, and if so, returns 1; 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
  • Decimal point in any position

Syntax:

&IS-DECIMAL (&variablename)

Aliases:

&is-decimal (&variablename)      &Is-Decimal (&variablename)
&isdecimal (&variablename)       &IsDecimal (&variablename)
&ISDECIMAL (&variablename)

Comments:

  • Arguments with decimals are not storable as numeric types.
  • A single decimal point is permitted.
  • MFG accepts both text and numeric type arguments.

Examples:

&IS-DECIMAL ("123")       = 1
&IS-DECIMAL ("+123")      = 1
&IS-DECIMAL ("-123")      = 1
&IS-DECIMAL ("123-")      = 0
&IS-DECIMAL ("123.")      = 1
&IS-DECIMAL (123)         = 1
&IS-DECIMAL (0)           = 1
&IS-DECIMAL (-123)        = 1
&IS-DECIMAL (".0123")     = 1
&IS-DECIMAL ("1.23")      = 1
&IS-DECIMAL ("1.2.3")     = 0
&IS-DECIMAL ("123A")      = 0
&IS-DECIMAL ("")          = 0