Action
Finds an item in a list.
Syntax
iPos = ListFind (lList, aItem)
Variable
|
Description
|
iPos
|
The position of the item.
INTEGER.
|
lList
|
The list to search.
LIST.
|
aItem
|
The item to find.
ANYTYPE.
|
Notes
ListFind returns the position of
aItem in
lList.
ListFind returns zero if the item is not in the list.
Example
[-] LIST lsFruit = {...}
[ ] "apples"
[ ] "oranges"
[ ] "bananas"
[ ] Print (ListFind (lsFruit, "oranges")) // prints: 2
[ ] Print (ListFind (lsFruit, "pears")) // prints: 0