The Insert function inserts a new item and sets the value to obj.
Syntax
Integer Array.Insert(
Pointer obj,
Integer index = -1,
Integer count = 1)
Pointer obj,
Integer index = -1,
Integer count = 1)
Parameters
| obj | Reference to insert. | Required |
|---|---|---|
| index | Index of the item to insert. -1: End. | Optional |
| count | Number of items to insert with the same value. | Optional |
Return value
The Insert function returns the index of the new item.
If an error occurs, the Insert function returns -1.
Example
Value value new
myArray.Insert(value)
myArray.Insert(value)