Vector_size

Homepage Containers

Returns the number of elements in the Vector object.

size := Vector_size(VectorObject)

Parameters

VectorObject The Vector object to use for the current operation.

Return Value

Number of elements in VectorObject.

Remarks

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

Related

Vector_capacity

Vector

Examples

;Creates a new Vector
myVector := Vector_new()

;Add two items to myVector
Vector_add(myVector, String_new("Item1"))
Vector_add(myVector, String_new("Item2"))

;Outputs the Vector's size (2)
MsgBox, % "myVector has " Vector_size(myVector) " elements."

Homepage  |  Containers