alpha() Function

The alpha() function evaluates the expression and returns 1 (true) if every character in the string is alphabetical (that is, a—z upper and lowercase), or 0 (false) if any character is nonalphabetical.

The empty (null) string ("") is considered nonalphabetical.

Syntax

alpha(exp)

Parameter(s)

exp

String to be tested for the existence of alphabetical characters.

Example(s)

If the value of the variable, response, is made up of only alpha characters, it is assigned to the first element of array.

if alpha(response) then array(1) = response

See Also

Boolean Evaluation, BASIC Functions, match Relational Operator, num() Function, Statements and Functions