SetItem
allows you to dynamically assign the elements of an array
determined at runtime rather than at compile time. It accepts the
name of the array as a string or variable together with the index
of the required element and the new value. SetItem treats a
multi-dimension array as a single dimension array. Array indices
for multi-dimensioned arrays may be calculated using GetRank,
and get GetLen. GetTotalLen returns the total size of the array
when regarded as a single dimensioned array.
Syntax:
SetItem(ArrayName, Index, Value)
Example:
arr =
"array1"
index
= 23
val
= 1.2345
SetItem(arr,
index, val)