Difference between revisions of "ACOPY()"
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to copy elements from one array to another | Function to copy elements from one array to another | ||
− | |||
==Syntax== | ==Syntax== | ||
ACOPY(<array1>,<array2> [,<expN1> [,<expN2> [,<expN3>]]]) | ACOPY(<array1>,<array2> [,<expN1> [,<expN2> [,<expN3>]]]) | ||
− | |||
==See Also== | ==See Also== | ||
− | [[AADD()]], [[AAVERAGE | + | [[AADD()]], [[AAVERAGE()]], [[ADEL()]], [[ADESC()]], [[ADIR()]], [[AELEMENT()]], [[AFIELDS()]], [[AFILL()]], [[AINS()]], [[ALEN()]], [[AMAX()]], [[AMIN()]], [[APPEND FROM ARRAY]], [[ARRAY()]], [[ASCAN()]], [[ASIZE()]], [[ASORT()]], [[ASTORE()]], [[ASTRING()]], [[ASUBSCRIPT()]], [[ASUM()]], [[COPY TO ARRAY]], [[DECLARE]], [[DIMENSION]], [[GATHER]], [[IN_ARRAY()]], [[IS_ARRAY()]], [[LOCAL]], [[PRIVATE]], [[PUBLIC]], [[RELEASE]], [[RESTORE]], [[SAVE]], [[SCATTER]] |
− | + | ||
==Description== | ==Description== | ||
The ACOPY() function allows the transfer of elements between arrays, enabling arrays to be subdivided or combined. The destination array must have sufficient elements to receive all those transferred. All elements of the source array <array1> will be copied to the target array <array2> unless <expN1> is entered to specify the element from which to start copying. The specification of <expN2> sets the number of elements to be copied sequentially. The starting element in the target array can be set with <expN3>. | The ACOPY() function allows the transfer of elements between arrays, enabling arrays to be subdivided or combined. The destination array must have sufficient elements to receive all those transferred. All elements of the source array <array1> will be copied to the target array <array2> unless <expN1> is entered to specify the element from which to start copying. The specification of <expN2> sets the number of elements to be copied sequentially. The starting element in the target array can be set with <expN3>. | ||
− | |||
==Example== | ==Example== | ||
Line 28: | Line 24: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | |||
[[Category:Array Processing Functions]] | [[Category:Array Processing Functions]] |
Latest revision as of 09:01, 7 December 2012
Contents
Purpose
Function to copy elements from one array to another
Syntax
ACOPY(<array1>,<array2> [,<expN1> [,<expN2> [,<expN3>]]])
See Also
AADD(), AAVERAGE(), ADEL(), ADESC(), ADIR(), AELEMENT(), AFIELDS(), AFILL(), AINS(), ALEN(), AMAX(), AMIN(), APPEND FROM ARRAY, ARRAY(), ASCAN(), ASIZE(), ASORT(), ASTORE(), ASTRING(), ASUBSCRIPT(), ASUM(), COPY TO ARRAY, DECLARE, DIMENSION, GATHER, IN_ARRAY(), IS_ARRAY(), LOCAL, PRIVATE, PUBLIC, RELEASE, RESTORE, SAVE, SCATTER
Description
The ACOPY() function allows the transfer of elements between arrays, enabling arrays to be subdivided or combined. The destination array must have sufficient elements to receive all those transferred. All elements of the source array <array1> will be copied to the target array <array2> unless <expN1> is entered to specify the element from which to start copying. The specification of <expN2> sets the number of elements to be copied sequentially. The starting element in the target array can be set with <expN3>.
Example
declare overview[4000] declare north[2000] // Copy first 2000 elements from source array // starting from position 1 in the target array acopy(north,overview,1,2000,1) declare south[1500] // Copy first 1500 elements from source array // starting from position 2001 in the target array acopy(south,overview,1,1500,2001)