Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Know is a variable containt letter
Message
 
À
29/07/2003 13:30:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00814615
Message ID:
00814623
Vues:
8
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform