Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CHRTRAN and remove characters
Message
 
 
To
14/10/2004 07:15:16
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Miscellaneous
Thread ID:
00950654
Message ID:
00951419
Views:
6
Fabio,

>as Gregory has said, I have not never made reference the algorithm of David.
>
>Moreover, the algorithm of David is not the best possible one in the case of CHRTRAN().
>When the LEN(param2)=LEN(param3) never copy it is necessary ( a single pointer is sufficient ).
>And CHRTRAN is similar to a ASCAN/LOOKUP/SELECT JOIN, and therefore in some cases

You started this thread based on the premise where characters are being removed from the output result.

CHRTRAN() is already fast enough under the LEN(param2)=LEN(param3) condition, so no other alternate code is required. VFP has O(n) performance when doing character for character substitution.

I never said my code was a chrtran() replacement, I only offered it as an illustration of how it could be done better.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform