Array_SetValRange (Reserved Word)
This reserved function places the value Val into each element of the dynamic array identified by ArrayName starting with element BegElementNum and ending with element EndElementNum.
Usage
Array_SetValRange(ArrayName, BegElementNum, EndElementNum, Val);
Return
A value of 0 will be returned if the function is successful in setting the values, otherwise one of the following values will be returned:
-1 - Unknown error
-2 - Invalid ArrayName
-3 - BegElementNum or EndElementNum is out of range
-4 - Val is wrong type
Parameters
Name | Description |
ArrayName | Identifies the source dynamic array to compare and is the name given in the array declaration |
BegElementNum | An integer representing the index of the first element in the range of values to be set to the value Val |
EndElementNum | An integer representing the index of the last element in the range of values to be set to the value Val |
Val | Identifies the value to be set and should be a numeric. |
Examples
Sets elements 5 through 12 of the specified array to a numeric value of 5.
Value1 = Array_SetValRange(MyDynArray, 5, 12, 5);