![]() |
<< Index >> |
FutureBasic 5 |
index$ I | statement | |
|
index$ I (element [,indexID]) = stringExpr$
index$
string arrays, and assigns the value of stringExpr$
to the new element (see the index$ statement and the clear <index> statement for information about how index$
arrays are created). The indexID
parameter specifies which of the index$
arrays (0 through 9) to insert an element into; if this parameter is omitted, index$
array 0 is used. The element
parameter specifies where in the array to insert the string.index$
statement, the index$ I
statement does not merely replace the contents of the indicated element. Instead, all of the strings at position element
and beyond are moved in memory, to open a space in which to insert the new string. As shown in the diagram, this also affect the element numbers by which the moved strings are identified.index$ D
, which deletes an element from the array.index$ I
, and replacing an element using the index$
statement.INDEX$ I(5) = "Riley" | |||||||||||||||||||
|
|
||||||||||||||||||
Before | After |
INDEX$(5) = "Riley" | |||||||||||||||||
|
|
||||||||||||||||
Before | After |