| Applying science to business management |
  
index
Format: index( list, sublist, start )
Arguments: [any] list Input list
[any] sublist Target sublist to locate within list
(int) start Optional starting location for search;
default = 0
Returns: (int) The location (element number) of the
first series of elements in list, beginning at start,
to match sublist, or -1 if no match is found
Examples: index([3,4,5,3,4,6],4)
= 1
index([3,4,5,3,4,6],4,1) = 1
index([3,4,5,3,4,6],4,2) = 4
index([3,4,5,3,4,6],[4,6]) = 4
index([1,2,"c","d"],"c")
= 2
index([1,2,"c","d"],"a")
= -1
See Also: sublist,
replist
|