Siebel eScript Language Reference > Siebel eScript Commands > The Global Object >

setArrayLength() Method


This function sets the first index and length of an array.

Syntax

setArrayLength(array[, minIndex], length])

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; must be 0 or less
length
The length of the array

Returns

Not applicable

Usage

This function sets the length of array to a range bounded by minIndex and length. If three arguments are supplied, minIndex, which must be 0 or less, is the minimum index of the newly sized array, and length is the length. Any elements outside the bounds set by minIndex and length become undefined. If only two arguments are passed to setArrayLength(), the second argument is length and the minimum index of the newly sized array is 0.

CAUTION:  The setArrayLength() 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

length Property and getArrayLength() Method


 Siebel eScript Language Reference 
 Published: 18 April 2003