Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement