Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check Numeric
Message
De
08/09/2004 12:57:39
 
 
À
08/09/2004 02:24:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00939224
Message ID:
00940337
Vues:
16
>>>
>>>#DEFINE allowedChars "0123456789"
>>>myValue = "111j11"
>>>? EMPTY(LEN(CHRTRAN(myValue, allowedChars, "")))
>>>
>>
>>Isn't the EMPTY(LEN()) a bit redundant?
>>
>>Just EMPTY(CHRTRAN(myValue, allowedChars, "")) should be sufficient.
>
>Not so Fred,
>
>test it with '1234' and '12 34'
>
>EMPTY(CHRTRAN('12 34', allowedChars, "")) && TRUE
>EMPTY(len(CHRTRAN('12 34', allowedChars, ""))) && FALSE
>
>ie empty(space(4)) = TRUE
>
>Note that if the arguement of empty() is a Memo containing space(4), it will return FALSE whereas a char field of space(4) would return TRUE

Given the example, it was OK. The example was not fully representative of potential situations.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform