Difference between revisions of "ASIZE()"

From Lianjapedia
Jump to: navigation, search
 
 
(2 intermediate revisions by 2 users not shown)
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()]], [[ABROWSE()]], [[ACHOICE()]], [[ACOL()]], [[ACOPY()]], [[ADEL()]], [[ADESC()]], [[ADIR()]], [[AELEMENT()]], [[AFIELDS()]], [[AFILL()]], [[AINS()]], [[ALEN()]], [[AMAX()]], [[AMIN()]], [[APPEND FROM ARRAY]], [[AROW()]], [[ARRAY()]], [[ASCAN()]], [[ASORT()]], [[ASTORE()]], [[ASTRING()]], [[ASUBSCRIPT()]], [[ASUM()]], [[COPY TO ARRAY]], [[DECLARE]], [[DIMENSION]], [[GATHER]], [[IN_ARRAY()]], [[IS_ARRAY()]], [[LOCAL]], [[PRIVATE]], [[PUBLIC]], [[RELEASE]], [[RESTORE]], [[SAVE]], [[SCATTER]]
+
[[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>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Array Processing]]
 
 
[[Category:Array Processing Functions]]
 
[[Category:Array Processing Functions]]

Latest revision as of 09:05, 7 December 2012

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