Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.3 . Guide To CA-Clipper - <b>aclone()</b> http://www.X-Hacker.org [<<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()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson