Support

Equilla Formula Language

SetValRangeArray

Sets a range of elements inside an array to a specified value. Returns 0 if everything is ok, returns -3 if indices are invalid.

Inputs

Array
ArrayRef: The array.
FirstIndex
Numeric: The index of the first element to set.
LastIndex
Numeric: The index of the last element to set.
NewValue
Any: The new value of elements Array[FirstIndex] to Array[LastIndex].

Examples

Set all elements to 1
Array: myArray[10]; SetValRangeArray(myArray, 1, 10, 1); print(myArray); // print 1 1 1 1 1 1 1 1 1 1