Xbasic
ISNUMBER Function
Syntax
Result_Flag as L = isnumber(C string [,L allow_decimal_separator [,L allow_thousands_separator ]])
Arguments
- string
A character string.
- allow_decimal_separator
Logical. Optional. Default = .F. .T. = allow decimal separators, .F. = do not allow decimal separators
- allow_thousands_separator
Logical. Optional. Default = .F. .T. = allow thousands separators, .F. = do not allow thousands separators
Description
Returns .t. if a text string contains only numbers
Discussion
ISNUMBER() returns .T. (TRUE) if a Character_String contains only numbers; otherwise, it returns .F. (FALSE).
Example
isnumber("123") = .T. isnumber("123a") = .F. ? isnumber("123,345.23") = .F. ? isnumber("123,345.23", .t.) = .F. ? isnumber("123,345.23", .t., .t.) = .T.
See Also