Vector_new |
Homepage Containers |
Creates an empty Vector object with the specified initial capacity and capacity increment.
VectorObject := Vector_new(InitialCapacity = 10, CapacityIncrement = 0)
| 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. |
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.
;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)