FastFind  Array

The FastFind function finds an item faster than Array.Find.

Before using FastFind, the array must be sorted.

Syntax

Integer Array.FastFind(
     Pointer obj,
     Integer iStart = 0,
     Integer iEnd = -1)

Parameters

objReference to find.Required
iStartIndex of the first item.Optional
iEndIndex of the last item (excluded).
-1: Last array item (included).
Optional

Return value

The FastFind function returns the index of the found item.

If an error occurs, the FastFind function returns -1.

Example

Array myArray new
myArray.FastInsert(obj1)
myArray.FastInsert(obj2)
myArray.FastInsert(obj3)
index = myArray.FastFind(obj2)
SECCIA Documentation - Copyright © 2001-2009 Sylvain Seccia