×

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.

Array Copy - MultiCharts
Open main menu

Array Copy

Revision as of 14:01, 20 January 2012 by 194.84.116.138 (talk) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

Array_Copy(SourceArray,SourceIndex,DestinationArray,DestinationIndex,NumberOfElements)

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:

Array_Copy(Array1,4,Array2,6,2);

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

Array_Copy(Array1,4,Array1,6,2);