SETITEM

Synopsis
SETITEM index array value
Description

Replaces the index-th item of an input array with a new value.

SETITEM ensures that the resulting array is not circular. That is, value may not be a list or array that contains the same array.

Example
MAKE "myarray (ARRAY 3 0)
SETITEM 2 :myarray 1
SETITEM 1 :myarray [2]
SETITEM 0 :myarray 3
SHOW :myarray
{3 [2] 1}

SourceForge.net Logo