FastIndex  Array

The FastIndex function retrieves the index of the specified item to insert.

The FastIndex function returns the same value than Array.FastInsert without inserting the item.

Before using FastIndex, the array must be sorted.

See Array.OnCompare.

Syntax

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

Parameters

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

Return value

The FastIndex function returns the index of the item.

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

Example

index = myArray.FastIndex(obj1)
SECCIA Documentation - Copyright © 2001-2013 Sylvain Seccia