Vector_capacity

Homepage Containers

Returns the number of elements the Vector object can hold.

capacity := Vector_capacity(VectorObject)

Parameters

VectorObject The Vector object to use for the current operation.

Return Value

Number of elements VectorObject can hold.

Remarks

If VectorObject is NULL (0 or blank), the empty string is returned, to indicate an error.

The Vector's capacity automatically increases to accommodate new items (as needed). The rate at which the capacity increases is based on the Vector's capacity increment.

Related

Vector_size

Vector

Examples

;Creates a new Vector (of capacity 15)
myVector := Vector_new(15)

;Outputs the Vector's capacity (15)
MsgBox, % "The capacity of myVector is " Vector_capacity(myVector) " elements."

Homepage  |  Containers