Vector_new

Homepage
Containers

Creates an empty Vector object with the specified initial capacity and capacity increment.

VectorObject := Vector_new(InitialCapacity = 10, CapacityIncrement = 0)

Parameters

InitialCapacity The initial capacity for the created Vector.
CapacityIncrement The amount the capacity is automatically incremented when its size becomes greater than its capacity. Specify 0 to double the capacity each time.

Return Value

Address for the newly created Vector object.

Remarks

If the system has insufficient memory to create the object (very rare), zero will be returned.

If InitialCapacity <= 0, this function creates a new Vector object with an initial capacity of 10.

Related

Vector_new1, Vector_destroy

Vector

Examples

;Creates a new Vector with the default parameters.
myVector := Vector_new()
;Creates a new Vector with initial capacity of 50.
myVector := Vector_new(50)
;Creates a new Vector with initial capacity of 15 and capacity increment of 5.
myVector := Vector_new(15, 5)

Homepage  |  Containers