&IS-ALPHANUMERIC

Examines an argument and returns 1 if the argument contains alphabetic and numeric characters only: A-Z, a-z or 0-9; otherwise, returns 0.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.

Syntax:

&IS-ALPHANUMERIC (&variablename)

Aliases:

&is-alphanumeric (&variablename)
&Is-Alphanumeric (&variablename)
&ISALPHANUMERIC (&variablename)
&isalphanumeric (&variablename)
&IsAlphanumeric (&variablename)

Comments:

  • If &variablename is numeric, and has a non-negative value, it is considered to be alphanumeric. However, a negative number--because of its minus sign--is not considered to be alphanumeric.
  • National characters, such as # & $, are not considered alphabetic.
  • The original argument remains unchanged.

Examples:

&IS-ALPHANUMERIC ("123")  = 1
&IS-ALPHANUMERIC ("+123") = 0
&IS-ALPHANUMERIC ("-123") = 0
&IS-ALPHANUMERIC ("ABC")  = 1
&IS-ALPHANUMERIC ("abc")  = 1
&IS-ALPHANUMERIC ("abc%") = 0
&IS-ALPHANUMERIC ("")     = 0
&IS-ALPHANUMERIC (1)      = 1
&IS-ALPHANUMERIC (-1)     = 0