Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why INLIST() returns .T. ??
Message
From
02/10/2001 20:36:07
Peter Wagner
Point Informática Ltda.
Limeira, Brazil
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Why INLIST() returns .T. ??
Miscellaneous
Thread ID:
00563377
Message ID:
00563377
Views:
44
Supose today is 10/02/01.
xdate = DATE() && Todays date
1)
? INLIST(ALLTRIM(STR(MONTH(xdate))),"1","2") && If Jan or feb (Returns .T. <<== ERROR)
* Here I expect .F.

2)
but if I do sometinhg like this..
STORE CMONTH(DATE( )) TO gcMonth
? INLIST(gcMonth,'January','February','March') && vorks fine ( Returns .F.)

3)
gcMonth = "Feb"
? INLIST(gcMonth,'January','February','March') && vorks fine ( Returns .F.)

Could someone explain Why I got an error in the first INLIST()
than inlist() search's for the "all" the expression in another set of expressions,
and Month() in this case returns 10, and I dont have "10" in the
expression list to match.
I thing if it just accept part of the string to match then it should
return .T. in the last sample.
What Im missing ?

TIA

Peter
Next
Reply
Map
View

Click here to load this message in the networking platform