Xbasic
ISALPHA Function
Syntax
Result_Flag as L = ISALPHA(C character)
Arguments
- character
A character string.
Description
Returns TRUE if the first character of a string is a letter.
Discussion
ISALPHA() returns . T. (TRUE) if the first character of the specified Character_String is a letter; otherwise, it returns .F. (FALSE).
Example
' if FIRSTNAME contains "Fred" ? isalpha(FIRSTNAME) = .T. ? isalpha("4WD") = .F.
Assume that you want to verify that a part number entered into a PARTNUM field starts with a letter. You can use the field rules to define the following validation expression:
isalpha(PARTNUM)
See Also