Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inlist() comparison question
Message
De
17/07/2000 02:12:53
Walter Meester
HoogkarspelPays-Bas
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00393021
Message ID:
00393109
Vues:
21
Hi Paul,

Instead of using exact on you can change your INLIST statement into:
INLIST(UPPER(cTemp),"THE ","AND ","ARE ","FOR ")
When the items in the list are padded with spaces to the lenght of the criteria to match, it exactly behaves like SET EXACT ON.

Walter,

>I have noticed that inlist works as if we were doing a compare with one equal sign. IOW, it only does the compare for the length of the expressions we are checking.
>
>cTemp = "ford"
>inlist(upper(cTemp),"THE","AND","ARE","FOR") returns .t.
>
>I would like to use the inlist function because I think I read that it is very efficient, but I only want it to return .t. if the exact match is found.
>
>Is my only option to do something like
>
>upper(cTemp) $ "THE|AND|ARE|FOR"
>
>I see that this works but I have a routine that can run this comparison a few million times so performance is a huge concern or consideratioin.
>
>Thanks in Advance,
>Paul
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform