Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CHRTRAN and remove characters
Message
 
 
À
14/10/2004 07:15:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Beta
Divers
Thread ID:
00950654
Message ID:
00951419
Vues:
7
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform