simlogo1

 

 

 

SimQuest 6.4 help

 

 

ReplaceElement

 

When applied to an array, a number, and an object, ReplaceElement produces the array obtained by replacing the element of the array at the index specified by the number by the object.
It has four variables: array, index, newElement, and result.

 

Examples:

       given index = 1 and newElement = a, (3, 9) becomes (a, 9)

       given index = 3 and newElement = b, (8, 2, 1) becomes (8, 2, b)

 

 

 

Related topics:

 

 

 

Copyright University of Twente 2011