$FUNCNAME$
  ACOPY()
$CATEGORY$
  Array
$SUMMARY$
   Copy elements from one array to another
$LANG_RU$
        .
$SYNTAX$

     ACOPY(<aSource>, <aTarget>,
	[<nStart>], [<nCount>], [<nTargetPos>]) --> aTarget


$LANG_RU$

     ACOPY(< >,< >,
       [< >],[<- >],
       [<.   >])
       -->  


$ARGUMENTS$

     <aSource> is the array to copy elements from.

     <aTarget> is the array to copy elements to.

     <nStart> is the starting element position in the <aSource> array.
     If not specified, the default value is one.

     <nCount> is the number of elements to copy from the <aSource> array
     beginning at the <nStart> position.  If <nCount> is not specified, all
     elements in <aSource> beginning with the starting element are copied.

     <nTargetPos> is the starting element position in the <aTarget> array
     to receive elements from <aSource>.  If not specified, the default value
     is one.


$LANG_RU$

     < > - ,    .

     < > - ,    .

     < > -      <
     >.    ,     
     .

     <- > -  ,  
        < >,   
     < >.   <- >  ,
       ,    < >.

     <.   > -    
     < >,     
     .    ,    -   .


$RETURNS$

     ACOPY() returns a reference to the target array, <aTarget>.


$LANG_RU$

     ACOPY()      < >.


$DESCRIPTION$

     ACOPY() is an array function that copies elements from the <aSource>
     array to the <aTarget> array.  The <aTarget> array must already exist
     and be large enough to hold the copied elements.  If the <aSource> array
     has more elements, some elements will not be copied.

     ACOPY() copies values of all data types including NIL and code blocks.
     If an element of the <aSource> array is a subarray, the corresponding
     element in the <aTarget> array will contain a reference to the subarray.
     Thus, ACOPY() will not create a complete duplicate of a multidimensional
     array.  To do this, use the ACLONE() function.


$LANG_RU$

     ACOPY() -     ,   
      < >   < >. 
     < >        
        ,    .
       < >   
     ,     .

     ACOPY()    ,  NIL   . 
     -   < >  ,
        < >  
       .  , ACOPY()    
      .  ,   , 
      ACLONE().


$EXAMPLES$

       This example creates two arrays, each filled with a value.
	The first two elements from the source array are then copied into the
	target array:

	LOCAL nCount := 2, nStart := 1, aOne, aTwo
	aOne := { 1, 1, 1 }
	aTwo := { 2, 2, 2 }
	ACOPY(aOne, aTwo, nStart, nCount)
	// Result: aTwo is now { 1, 1, 2 }


$LANG_RU$

           ,   
       .        
        :

       LOCAL nCount := 2, nStart := 1, aOne, aTwo
       aOne := ( 1, 1, 1 )
       aTwo := ( 2, 2, 2 )
       ACOPY(aOne, aTwo, nStart, aCount) // : aTwo - {1, 1, 2}


$SEEALSO$
  ACLONE(),ADEL(),AEVAL(),AFILL(),AINS(),ASORT(),
$END$
