resize-array ( n array -- new-array )
Factor handbook > The language > Collections > Arrays

Prev:4array ( w x y z -- array )


Inputs and outputs
na non-negative integer
arrayan array
new-arrayan array

Word description
Resizes the array to have a length of n elements. When making the array shorter, this word may either create a new array or modify the existing array in place. When making the array longer, this word always allocates a new array, filling remaining space with f.

Side effects
Modifies array


PRIMITIVE: resize-array ( n array -- new-array )