Caché MultiValue Basic Reference
ALPHA
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Class Reference   
Search:    

Determines if a string is alphabetic or not.
Synopsis
ALPHA(string)
Arguments
string An expression that resolves to a string.
Description
If string consists entirely of alphabetic characters, ALPHA returns 1. Otherwise, ALPHA returns 0. Note that blank spaces are non-alphabetic characters. Dynamic array separator characters are considered to be alphabetic characters. On a Unicode system ALPHA recognizes Unicode letters as alphabetic characters.
Examples
The following example uses the ALPHA function to determine if a string consists of only alphabetic characters:
PRINT ALPHA("abcdefg");    ! Returns 1
PRINT ALPHA("AbCdEfG");    ! Returns 1
PRINT ALPHA("my string");  ! Returns 0 (space not allowed)
PRINT ALPHA("half-wit");   ! Returns 0 (hyphen not allowed)
PRINT ALPHA("");           ! Returns 0
PRINT ALPHA(123);          ! Returns 0
See Also