Algosim documentation: VarAppend

VarAppend

Appends an element to a container variable.

Syntax

If X is an lvalue and a container and x an object that can be part of X, then VarAppend(X, x) appends x to the end of X and returns success.

This is the procedural version of append.

Examples

v ≔ SequenceVector(10)
(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
VarAppend(v, 11)
success
v
(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)

See also