up previous next
NewList

create a new list

Syntax
NewList(N: INT): LIST
NewList(N: INT, E: OBJECT): LIST

Description
The first form returns a list of length N filled with 0 ( INT ). The second form returns a list of length N , filled with copies of E .

Example
/**/  NewList(4,"a");
["a", "a", "a", "a"]

/**/  NewList(4);
[0, 0, 0, 0]

See Also