General information
Category:
Coding, syntax & commands
Title:
Why INLIST() returns .T. ??
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only