Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Know is a variable containt letter
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00814615
Message ID:
00814633
Vues:
15
Unfortunately Val() function won't work. Example val("12s2") returns 12,
It would be better to do something like
?!empty(chrtran("12s2","1234567890",""))
This returns .t. if any character is not a number but returns .f. if all characters are numbers. You may need to include a decimal point in the chrtran second parameter if decimal numbers are acceptable.

>Use VAL() function. VAL() returns zero if string is passed. You will have to check if the variable contains zero string. e.g. "0" or "0.00" etc.
>
>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform