Some InstantView®
statements take a variable amount of parameters out of the stack; some leave an
unpredictable amount of results in the stack. The stack might also contain other
values! [ and ] pool values inside these markers in a vector.
InstantView® vectors
can contain elements of different types. Comparing to C/C++, there is an analogy
to arrays, as well as to structures. Two vector states are possible in the
stack:
Vector operations are supported by the following statements:
| -> var | assigned to a variable |
| # | [ e1, ...en ] in pooled in a stack entry (shrink) / opposite operation (explode) |
| | | join vectors, add an element to a vector, result is another vector |
| - | remove vector element from a vector, result is another vector |
| = | compare two vectors |
| Insert | insert an element into a vector |
| GetElement | obtain k-th vector element |
| Revert | reverse vector element order |
| GetVector | generate vector (out of a collection, ...) |
| CreateVector(n) | generate empty vector (pre-allocated for n elements) |
Statements, which accept vectors as entry parameters are:
SetFormat, SetSort, FillObox,
UpdateObox, RemoveObox, SetSelection, PutLine, Insert,
Remove, GetObject . . .
The statement iterate can iterate via vector elements.