ISDIGIT( ) Function
Determines whether the leftmost character of the specified character expression is a digit (0 through 9).
ISDIGIT(cExpression)
Return Value
Logical
Parameters
- cExpression
Specifies the character expression that ISDIGIT( ) tests. Any characters after the first character in cExpression are ignored.
Remarks
ISDIGIT( ) returns true (.T.) if the leftmost character of the specified character expression is a digit (0 through 9); otherwise, ISDIGIT( ) returns false (.F.).
Example
CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE orders && Open Orders table
CLEAR
DISPLAY cust_id
? ISDIGIT(cust_id) && Displays .F.
DISPLAY order_dsc
? ISDIGIT(ALLTRIM(STR(order_dsc))) && Displays .T.