Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to check Alphabetic letters
Message
From
07/10/2004 03:35:44
 
 
To
06/10/2004 16:09:39
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00949197
Message ID:
00949441
Views:
9
>>>Hello,
>>>
>>>How to check for alphabetic letters in myfield or which command in VFP to use to check it ?
>>>
>>>myfield = 'aaaBBBccc' good
>>>myfield = 'aaa123ddd' no good skip this row.
>>>
>>>Tia
>>
>>
>>? Test('aaaBBBccc')
>>? Test('aaa123ddd')
>>
>>PROCEDURE Test(ss)
>>RETURN EMPTY(AT("0",CHRTRAN(m.ss, "123456789", "000000000")))
>>
>
>Simpler:
>
>
procedure test(ss)
>return ss==chrtran(ss, "0123456789","**********")
Apparently, but on VFP it have to read the string ss, into the VM stack , TWO TIMES;
if m.ss is a 16M string this is a very slow process.

When VFP it will support the use of strings by reference into expressions
and into native functions, then all will improve of NNNx times
return (@m.ss)==chrtran((@m.ss), "0123456789","**********")
Previous
Reply
Map
View

Click here to load this message in the networking platform