×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

Changes - MultiCharts
Open main menu

Changes

Array Copy

1,398 bytes added, 14:01, 20 January 2012
Created page with "Copies a specified number of elements from the specified one-dimensional source array, starting at the specified source index; the elements are copied to the specified one-dim..."
Copies a specified number of elements from the specified one-dimensional source array, starting at the specified source index; the elements are copied to the specified one-dimensional destination array, starting at the specified destination index.
Source and destination can be the same array as well as two different arrays.

==== Usage ====
<syntaxhighlight>Array_Copy(SourceArray,SourceIndex,DestinationArray,DestinationIndex,NumberOfElements)</syntaxhighlight>

Where: [[SourceArray]] - an expression specifying the name of the source array

[[DestinationArray]] - an expression specifying the name of the destination array

[[SourceIndex]] - a numerical expression specifying the starting index for the source array

[[DestinationIndex]] - a numerical expression specifying the starting index for the destination array

[[NumberOfElements]] - a numerical expression specifying the number of elements to copy

==== Example ====
Copy from Array1 the two-element segment beginning at the index of 4, to the Array2, beginning at the index of 6:

<syntaxhighlight>Array_Copy(Array1,4,Array2,6,2);</syntaxhighlight>

Copy from Array1 the two-element segment beginning at the index of 4, to the same array, beginning at the index of 6:

<syntaxhighlight>Array_Copy(Array1,4,Array1,6,2);</syntaxhighlight>


[[Category:Dynamic Arrays]]
Anonymous user