Home

put puti re

putiPut and Increment Index

The puti function puts an element into a vector, matrix, or list and increments the index, as follows:

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

The puti 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.