findfirst


Purpose
Find the first occurrence of an element in a list.
Synopsis
function findfirst(l:list, e:type_of_l):integer
Arguments
A list
The element to look for (it must be of the type of l)
Return value
The position of the element or 0 if the element is not included in the list.
Example
L:=['a','b','c','d','b']
i:=findfirst(L,'b')    ! => i=2
i:=findlast(L,'f')     ! => i=0
Related topics
findlast


If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.