Insert (vector operation)
Insert
Stack | Position | Description |
---|---|---|
Stack(In) | Top | Vector |
Top 1 | element to be inserted | |
Stack(Out) | Top | - |
Appends the value of Stack-Top-1 as last element to the vector lying on the stack-top.
Code example:
3€ [ 1€ 2€ ] Insert => [ 1€ 2€ 3€ ]
If an element is to be placed at the beginning of a vector, the operator |
must be used.Note: An empty vector with n pre-allocated elements can be created with CreateVector. This can accelerate the construction of very large vectors even more.