Create an array of given size

newarray size
(newarray size expression)

Creates a new array with the number of elements equal to size. Size has to be a positive integer value. All elements of the new array are set to 0 or to the value of the optional expression.


print newarray 3
print (newarray 3 "abc)


{0 0 0}
{abc abc abc}

See also:

array - create an array from values


Table of Content