Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code more logic
Message
De
01/09/2004 01:42:35
 
 
À
31/08/2004 04:33:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00937914
Message ID:
00938304
Vues:
32
Hi,

in addition to the other answers:

if you have a very large table, replacing each occurrence
with a different line can take some time, since the table has to
be scanned every time again if there is no index on char8 to help
each replace with rushmore.

If you have only a few alternatives, coding like
REPLACE ALL CHAR18 WITH ;
   iif (CHAR8="ÌäæÈ ÚãÇä                                         ", "3", ;
   iif (CHAR8="ãÍÇÝÙÉ ÇÑÈÏ                                       ", "8", ;
   iif (CHAR8="ÛÑÈ ÚãÇä                                          ", "2", CHAR18)))
will speed things up, even if it is slightly more diffcult to follow the code
[If you are using vfp9 check iCase].

If the replace is a step in normalizing a table where many CHAR18 are mapped to
CHAR8, create the lookup table before replacing and read up on lookup() and
similar functions. When table based logic should be employed is a matter of
personal preference and performance on the machine/task.

HTH

thomas
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform