Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Numbers or letters
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00554495
Message ID:
00554509
Vues:
13
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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform