Array constructor
Provides a reference for array constructors in IBM ILOG Script.
The array constructor has two distinct forms.
| Syntax | Effect |
|---|---|
| new Array(length) | Returns a new array a of length If Examples: new Array(12) –> an array a with length 12 and a[0] to a[11] containing null new Array("5") –> an array a with length 5 and a[0] to a[4] containing null new Array("foo") see second syntax |
| new Array(element1, ..., elementn) | Returns a new array a of length n with a Examples: new Array(327, "hello world") –> an array a of length 2 with a[0] == 327 and a[1] == "hello world" new Array() –> an array with length 0 new Array("327") see first syntax |