size-setter

Sets the size of an object.  object is modified by this operation.

Methods are provided for stretchy sequences; that is, for collections that are instances both of <stretchy-collection> and of <sequence>.

size-setter sets the size of a stretchy sequence to be new-size.  The stretchy sequence is modified by this operation.  If new-size is less than or equal to the original size of the stretchy sequence, then the first new-size elements of the stretchy sequence are retained at the same positions.  If new-size is greater than the original size of the stretchy sequence, then the previous elements of the stretchy sequence are retained at the same positions, and enough new elements are added to reach the new size.  The value of each new element is the same as would have been used if the stretchy sequence had been created with make, specifying size: new-size but not fill:.

It is not specified how size-setter adds new elements to the stretchy sequence.  In particular, it is not required to call add! or any other predefined function.

Exported from

Modifiers

open

Arguments

new-sizeAn instance of <object>.
objectAn instance of <object>.

Values

new-sizeAn instance of <object>.
The class of collections that may grow or shrinking to accommodate adding or removing elements.
The class of collections whose keys are consecutive integers starting from zero.
Sets the size of an object.
Returns a general instance of its first argument.
Adds an element to a sequence, possibly modifying the sequence.
The common-dylan module.
Whenever possible, we have tried to keep the Dylan module pristine and unextended, preferring to add our extensions to separate modules or libraries.
The class of all Dylan objects.