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>asize()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ASIZE()
 Grow or shrink an array
------------------------------------------------------------------------------
 Syntax

     ASIZE(<aTarget>, <nLength>) --> aTarget

 Arguments

     <aTarget> is the array to grow or shrink.

     <nLength> is the new size of the array.

 Returns

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

 Description

     ASIZE() is an array function that changes the actual length of the
     <aTarget> array.  The array is shortened or lengthened to match the
     specified length.  If the array is shortened, elements at the end of the
     array are lost.  If the array is lengthened, new elements are added to
     the end of the array and assigned NIL.

     ASIZE() is similar to AADD() which adds a single new element to the end
     of an array and optionally assigns a new value at the same time.  Note
     that ASIZE() is different from AINS() and ADEL(), which do not actually
     change the array's length.

     Note:  ASIZE() only supports single-dimensional arrays.

 Examples

     .  These examples demonstrate adding new elements and deleting
        existing elements:

        aArray := { 1 }          // Result: aArray is { 1 }
        ASIZE(aArray, 3)         // Result: aArray is { 1, NIL, NIL }
        ASIZE(aArray, 1)         // Result: aArray is { 1 }

 Files   Library is CLIPPER.LIB.


See Also: AADD() ADEL() AFILL() AINS()

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