Siebel eScript Language Reference > Siebel eScript Commands > Conversion or Casting Methods >

getArrayLength() Method


This function returns the length of a dynamically created array.

Syntax

getArrayLength(array[, minIndex])

Parameter
Description

array

The name of the array whose length you wish to find

minIndex

The index of the lowest element at which to start counting

Returns

The length of a dynamic array, which is one more than the highest index of an array.

Usage

Most commonly, the first element of an array is at index 0. If minIndex is supplied, then it is used to set to the minimum index, which is zero or less.

This function should be used with dynamically created arrays, that is, with arrays that were not created using the Array() constructor and the new operator. The length property is not available for dynamically created arrays. Dynamically created arrays must use the getArrayLength() and setArrayLength() functions when working with array lengths.

When working with arrays created using the Array() constructor and the new operator, use the length property of the arrays.

CAUTION:  The getArrayLength() function is unique to Siebel eScript. Avoid using it in a script that may be used with a JavaScript interpreter that does not support it.

See Also

The Array Constructor in Siebel eScript
length Property
setArrayLength() Method

Siebel eScript Language Reference