FastInsert  Array

The FastInsert function retrieves the correct index of the new item before inserting it.

You must call FastInsert if you want to use Array.FastFind without sorting the array.

Before using FastInsert, the array must be sorted.

Syntax

Integer Array.FastInsert(
     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 FastInsert function returns the index of the new item.

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

Example

myArray.FastInsert(obj1)
myArray.FastInsert(obj2)
SECCIA Documentation - Copyright © 2001-2009 Sylvain Seccia