up previous next
NewList

create a new list

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

Description
The second function returns a list of length N, filled by E. The first function, in which E is not indicated, returns a list of length N filled with 0 ( INT ).

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

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

See Also