InList()
This function determines whether the value of the first expression is in the list of values supplied. INLIST() works on almost every field type in Visual FoxPro—only General is excluded.
Usage |
lIsItThere = INLIST( eExpression, eList1, eList2, ...) |
Parameter |
Value |
Meaning |
eExpression |
Character, Memo, Currency, Date, DateTime, Double, Integer, Logical, Numeric |
The value to search for in the list. |
eListn |
Same as eExpression |
Valid values. |
lIsItThere |
.T. |
The matching item was found in the list. |
.F. |
The matching item was not found in the list. |
Example |
? INLIST(27, 12, 27, 50) && returns .T. ? INLIST("one", "two", "three", "one") && returns .T. ? INLIST("one", "two", "three", "ONE") && returns .F. |
See Also |