MQL4 Reference Array Functions ArrayInitialize
ArrayInitializeThe function initializes a numeric array by a preset value. For initialization of an array of char type
For initialization of an array of short type
For initialization of an array of int type
For initialization of an array of long type
For initialization of an array of float type
For initialization of an array of double type
For initialization of an array of bool type
For initialization of an array of uint type
Parameters array[] [out] Numeric array that should be initialized. value [in] New value that should be set to all array elements. Return Value No return value. Note The ArrayResize() function allows to set size of an array with a reserve for further expansion without the physical relocation of memory. It is implemented for the better performance, because the operations of memory relocation are reasonably slow. Initialization of the array using ArrayInitialize(array, init_val) doesn't mean the initialization with the same value of reserve elements allocated for this array. At further expanding of the array using the ArrayResize() function, the elements will be added at the end of the array, their values will be undefined and in most cases will not be equal to init_value. Example:
|