_setItem
HC
Data Structure Primitives
Mutators
_setItem
_setItem index array value
thing.index=value table'index=value
command. Changes the "index"th member of "array" to be "value", like setItem, but without checking for circularity. WARNING: Primitives whose names start with a underbar are DANGEROUS. Their use by non-experts is not recommended. The use of _setItem can lead to circular arrays, which will get some Logo primitives into infinite loops; and the loss of memory if a circular structure is released.
The experimental dot notation is still in test phase; index cannot be an expression yet.
The singlequote ' notation is also experimental.
Examples:
l=[a b c]
l.2="hallo
l
[a hallo c]
;-)
_setItem 3 l 333
l
[a hallo 333]
;-)
t=table 5
setItem "a t 1234
t ;[a 1234] ;-)
t'b=5678
t ;[a 1234][b 5678] ;-)
|