Array.First

Parent Previous Next

Array.First.

Returns the index position (0-based) of the first occurrence of the item, if it is in the array. Otherwise returns -1.


Syntax.


 First(Type item) : Integer

 


Arguments:


Example:


 Integer pos, arr[] := [0, 2, 4, 5, 4];

 pos := arr[].First(4); //Now pos == 2;