Create an array from values

array expr1 expr2
(array expression)
(array expr1 expr2 expr3 ...)

Creates an array of elements obtained from expressions passed as arguments of the instruction. Two-element array is created by default. Put the instruction and expressions in parentheses in order to create an array of any other size (including an empty array).


print (array 2 + 3 "abc [a b])


{5 abc [a b]}

See also:

newarray - create an array of given size


Table of Content