Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numbers or letters
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00554495
Message ID:
00554509
Views:
19
FUNCTION myfunction1(tcString)
* Returns .T. if there're only digits and spaces in tcString and .F. otherwise
RETURN EMPTY(CHRTRAN(tcString, "0123456789", ""))

FUNCTION myfunction2(tcString)
* Returns .T. if there're only digits in tcString and .F. otherwise
RETURN LEN(CHRTRAN(tcString, "0123456789", "")) = 0
>A friend of mine asked me a question
>
> He has a character field in a table
> that may store values as
>
> John or 1234
>
> Can anybody imagine a function that
> returns .t. when field contais only
> numbers or .f. when contais numbers and letters ?
>
>
> Thanks
>
> Moisés
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform