Difference between revisions of "ASIZE()"
Yvonne.milne (Talk | contribs) m (1 revision) |
|||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to resize an array | Function to resize an array | ||
− | |||
==Syntax== | ==Syntax== | ||
ASIZE(<array-name>,<expN>) | ASIZE(<array-name>,<expN>) | ||
− | |||
==See Also== | ==See Also== | ||
− | [[AADD()]], [[AAVERAGE | + | [[AADD()]], [[AAVERAGE()]], [[ACOPY()]], [[ADEL()]], [[ADESC()]], [[ADIR()]], [[AELEMENT()]], [[AFIELDS()]], [[AFILL()]], [[AINS()]], [[ALEN()]], [[AMAX()]], [[AMIN()]], [[APPEND FROM ARRAY]], [[ARRAY()]], [[ASCAN()]], [[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 ASIZE() function can be used to resize an array. The <array-name> is the name of an existing array to resize. The <expN> is the number of rows the array should be given. For a one-dimensional array the number of rows is the same as the number of elements. If the <expN> is smaller than the original number of rows, the contents of rows higher than <expN> are lost. | The ASIZE() function can be used to resize an array. The <array-name> is the name of an existing array to resize. The <expN> is the number of rows the array should be given. For a one-dimensional array the number of rows is the same as the number of elements. If the <expN> is smaller than the original number of rows, the contents of rows higher than <expN> are lost. | ||
− | |||
==Example== | ==Example== | ||
Line 36: | Line 32: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:Array Processing]] | [[Category:Array Processing]] | ||
[[Category:Array Processing Functions]] | [[Category:Array Processing Functions]] |
Revision as of 08:39, 16 November 2011
Contents
Purpose
Function to resize an array
Syntax
ASIZE(<array-name>,<expN>)
See Also
AADD(), AAVERAGE(), ACOPY(), ADEL(), ADESC(), ADIR(), AELEMENT(), AFIELDS(), AFILL(), AINS(), ALEN(), AMAX(), AMIN(), APPEND FROM ARRAY, ARRAY(), ASCAN(), ASORT(), ASTORE(), ASTRING(), ASUBSCRIPT(), ASUM(), COPY TO ARRAY, DECLARE, DIMENSION, GATHER, IN_ARRAY(), IS_ARRAY(), LOCAL, PRIVATE, PUBLIC, RELEASE, RESTORE, SAVE, SCATTER
Description
The ASIZE() function can be used to resize an array. The <array-name> is the name of an existing array to resize. The <expN> is the number of rows the array should be given. For a one-dimensional array the number of rows is the same as the number of elements. If the <expN> is smaller than the original number of rows, the contents of rows higher than <expN> are lost.
Example
declare array1[100] ? alen(array1) 100 asize(array1,200) ? alen(array1) 200 declare array2[100,5] ? alen(array2) 500 ? alen(array2,1) 100 asize(array2, alen(array2,1)+1) ? alen(array2) 505 ? alen(array2,1) 101