Vector / Dynamic arrays

Vector / Dyn_* Methods

The Vector / dyn_* object provides following methods:

Method Description
"at" Returns a reference to the element at the given index.
"append" Appends the given value.
"clear" Empties the vector/dyn_*.
"contains" Returns true if an element is equal to the given value or false if not found.
"count" Returns the number of elements in the vector / dyn_*.
"first" Returns a reference to the first element.
"indexListOf" Returns a list of indexes at which the given value was found.
"indexOf" Returns the index of the first element which is equal to the given value.
"insertAt" Inserts the given value at the given index.
"isEmpty" Returns true if the vector / dyn_* is empty.
"last" Returns a reference to the last element.
"prepend" Inserts given value as first element.
"removeAt" Removes the element at given index.
"replaceAt" Replaces the value at the given index.
"sort" Sorts the array.
"takeAt" Takes out the value at the given index and returns it.
"takeFirst" Takes out the first value and returns it.
"takeLast" Takes out the last value and returns it.
"unique" Removes all duplicate elements in an array.

Dynamic Array Specific Functions

These functions calculate, sort and manipulate the contents of arrays. The individual elements of dynamic arrays (for instance the dynamic variable array) are addressed in the form array[i]. The smallest index is one.

The elements of a data point attribute of type dynamic array cannot be set individually using the functions dpSet(), dpSetTimed(), and cannot be read individually using dpGet(), dpGetAsynch() or dpGetPeriod(). In the same way, the dpConnect function cannot be performed on individual elements of a dynamic array. Original and online values are only passed to a dynamic field as a complete value.