[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ACLONE()
 Duplicate a nested or multidimensional array
------------------------------------------------------------------------------
 Syntax

     ACLONE(<aSource>) --> aDuplicate

 Arguments

     <aSource> is the array to be duplicated.

 Returns

     ACLONE() returns a duplicate of <aSource>.

 Description

     ACLONE() is an array function that creates a complete duplicate of the
     <aSource> array.  If <aSource> contains subarrays, ACLONE() creates
     matching subarrays and fills them with copies of the values in the
     <aSource> subarrays.  ACLONE() is similar to ACOPY(), but ACOPY() does
     not duplicate nested arrays.

 Examples

     .  This example creates an array then duplicates it using
        ACLONE().  The first array is then altered, but the duplicate copy is
        unaffected:

        LOCAL aOne, aTwo
        aOne := { 1, 2, 3 }         // Result: aOne is {1, 2, 3}
        aTwo := ACLONE(aOne)        // Result: aTwo is {1, 2, 3}
        aOne[1] := 99               // Result: aOne is {99, 2, 3}
                                   // aTwo is still {1, 2, 3}

 Files   Library is CLIPPER.LIB.


See Also: ACOPY() ADEL() AINS() ASIZE()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson