Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
INLIST() returning 'wrong' result
Message
 
 
To
07/04/2008 19:19:00
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01308878
Message ID:
01308905
Views:
15
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform