resize-array ( n array -- new-array ) (original) (raw)

Vocabulary
arrays

Inputs

n a non-negative integer
array an array

Outputs

new-array an 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

Definition

IN: arrays

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