Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Know is a variable containt letter
Message
 
To
29/07/2003 13:30:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00814615
Message ID:
00814623
Views:
7
Robert,

One way might be to eliminate the alpha characters from the string and then see if its length is the same as the incoming string.
lcstring='bob'
?LEN(lcstring) # LEN(CHRTRAN(lcstring,CHRTRAN(lcstring,'0123456789',''),''))

lcstring='123'
?LEN(lcstring # LEN(CHRTRAN(lcstring,CHRTRAN(lcstring,'0123456789',''),''))

lcstring='12s2'
?LEN(lcstring) # LEN(CHRTRAN(lcstring,CHRTRAN(lcstring,'0123456789',''),''))
>i have three variable
>
>1- "bob"
>2- "123"
>3- "12s2"
>
>
>i want to be able to know if these variable containt character
>
>so the result will be
>
>1- yes
>2- no
>3- yes
>
>thanks
Tom

Life happens, don't blink.
Previous
Reply
Map
View

Click here to load this message in the networking platform