Home

get geti head

getiGet and Increment Index

The geti function gets an element of a vector, matrix, or list and increments the index, as follows:

[a] b->[a] b++ c
[[a]] b->[[a]] b++ d
{a} b->{a} b++ obj
[a] {b}->[a] {b}++ c
[[a]] {b c}->[[a]] {b c}++ d
{a} {b}->{a} {b}++ obj
'a' b->'a' b++ obj
'a' {b}->'a' {b}++ obj

The geti function clears the index wrap flag when the index is incremented or sets the index wrap flag when the index is wrapped back to the first position. The index wrap flag can be retrieved with the iwrap function.