Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check Numeric
Message
From
08/09/2004 12:57:39
 
 
To
08/09/2004 02:24:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00939224
Message ID:
00940337
Views:
17
>>>
>>>#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
Previous
Reply
Map
View

Click here to load this message in the networking platform