Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
INLIST() returning 'wrong' result
Message
 
 
À
07/04/2008 19:19:00
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01308878
Message ID:
01308905
Vues:
14
>lDoesSuffixExist evaluates to .F. for this. It must be something simple, but I can't see it. I was expecting .T. as the result.
>
>
>tcName = "Thurston Howell III"
>lDoesSuffixExist = INLIST(UPPER(tcName),"PHD","II","III","IV","V","JR","SR","ESQ","CPA","CEA","DD","MD","JD")
>
It works as it is designed for. Did you look it up in Help?

If you want to check for the suffix, you may put all your suffixes in the table or array and check for each one in a name string, e.g.
if " " + lcSuffix + " " $ " " + lcName + " "
  && Name has suffix, exit from the loop
endif
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform