MQL4 Reference Array Functions ArrayFill
ArrayFillThe function fills an array with the specified value.
Parameters array[] [out] Array of simple type (char, uchar, short, ushort, int, uint, long, ulong, bool, color, datetime, float, double). start [in] Starting index. In such a case, specified AS_SERIES flag is ignored. count [in] Number of elements to fill. value [in] Value to fill the array with. Returned value No return value. Note When ArrayFill() function is called, normal indexation direction (from left to right) is always implied. It means that the change of the order of access to the array elements using ArraySetAsSeries() function is ignored. A multidimensional array is shown as one-dimensional when processed by ArrayFill() function. For example, array[2][4] is processed as array[8]. Therefore, you may specify the initial element's index to be equal to 5 when working with this array. Thus, the call of ArrayFill(array, 5, 2, 3.14) for array[2][4] fills array[1][1] and array[1][2] elements with 3.14. Example:
|