MQL4 Reference Array Functions ArrayCopy
ArrayCopyIt copies an array into another one.
Parameters dst_array[] [out] Destination array src_array[] [in] Source array dst_start=0 [in] Starting index from the destination array. By default, start index is 0. src_start=0 [in] Starting index for the source array. By default, start index is 0. count=WHOLE_ARRAY [in] Number of elements that should be copied. By default, the whole array is copied (count=WHOLE_ARRAY). Return Value It returns the number of copied elements. Note If count<=0 or count>src_size-src_start, all the remaining array part is copied. Arrays are copied from left to right. For series arrays, the starting position is correctly defined adjusted for copying from left to right. If an array is copied to itself, the result is undefined. If arrays are of different types, during copying it tries to transform each element of a source array into the type of the destination array. A string array can be copied into a string array only. Array of classes and structures containing objects that require initialization aren't copied. An array of structures can be copied into an array of the same type only. For static and dynamic arrays (except for class and structure members), the size of a destination array is automatically increased to the amount of copied data (if the latter exceeds the array size). Example:
|