Difference between revisions of "ASTORE()"

From Recital Documentation Wiki
Jump to: navigation, search
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
{{YLM to do}}
 
- array does not need to be pre-declared
 
 
==Purpose==
 
==Purpose==
 
Function to fill an array with character strings that are separated with a specified character
 
Function to fill an array with character strings that are separated with a specified character
Line 10: Line 8:
  
 
==See Also==
 
==See Also==
[[AADD()]], [[AAVERAGE()]], [[ABROWSE()]], [[ACHOICE()]], [[ACOL()]], [[ACOPY()]], [[ADEL()]], [[ADESC()]], [[ADIR()]], [[AELEMENT()]], [[AFIELDS()]], [[AFILL()]], [[AINS()]], [[ALEN()]], [[ALINES()]], [[AMAX()]], [[AMIN()]], [[APPEND FROM ARRAY]], [[AROW()]], [[ARRAY()]], [[ASCAN()]], [[ASIZE()]], [[ASORT()]], [[ASTRING()]], [[ASUBSCRIPT()]], [[ASUM()]], [[COPY TO ARRAY]], [[DBEDIT()]], [[DECLARE]], [[DIMENSION]], [[GATHER]], [[IN_ARRAY()]], [[LOCAL]], [[MENU AT]], [[MENU BROWSE]], [[MENU FIELDS]], [[MENU FILES]], [[MENU FROM]], [[MENUITEM()]], [[PRIVATE]], [[PUBLIC]], [[RELEASE]], [[RESTORE]], [[SAVE]], [[SCATTER]]
+
[[AADD()]], [[AAVERAGE()]], [[ABROWSE()]], [[ACHOICE()]], [[ACOL()]], [[ACOPY()]], [[ADEL()]], [[ADESC()]], [[ADIR()]], [[AELEMENT()]], [[AFIELDS()]], [[AFILL()]], [[AINS()]], [[ALEN()]], [[ALINES()]], [[AMAX()]], [[AMIN()]], [[APPEND FROM ARRAY]], [[AROW()]], [[ARRAY()]], [[ASCAN()]], [[ASIZE()]], [[ASORT()]], [[ASTRING()]], [[ASUBSCRIPT()]], [[ASUM()]], [[COPY TO ARRAY]], [[DBEDIT()]], [[DECLARE]], [[DIMENSION]], [[GATHER]], [[IN_ARRAY()]], [[IS_ARRAY()]], [[LOCAL]], [[MENU AT]], [[MENU BROWSE]], [[MENU FIELDS]], [[MENU FILES]], [[MENU FROM]], [[MENUITEM()]], [[PRIVATE]], [[PUBLIC]], [[RELEASE]], [[RESTORE]], [[SAVE]], [[SCATTER]]
  
  
 
==Description==
 
==Description==
The ASTORE() function fills the <array> with character strings from <expC1> which are separated by the character specified in <expC2>.  The array must have been previously declared.  The character strings are copied into the array elements until either all the elements are filled, or all the strings are copied.  The length of the array is automatically shortened to the number of elements stored in it.  The ASTORE() function returns the number of character strings copied into the array.  The ASTORE() function is most commonly used in combination with menu commands where multiple selections can be made.
+
The ASTORE() function fills the <array> with character strings from <expC1> which are separated by the character specified in <expC2>.  The array will be created if it has not been previously declared.  For an existing array, the character strings are copied into the array elements until either all the elements are filled, or all the strings are copied and the length of the array is automatically shortened to the number of elements stored in it.  The ASTORE() function returns the number of character strings copied into the array.  The ASTORE() function is most commonly used in combination with menu commands where multiple selections can be made.
  
  
Line 40: Line 38:
 
[[Category:Array Processing]]
 
[[Category:Array Processing]]
 
[[Category:Array Processing Functions]]
 
[[Category:Array Processing Functions]]
 +
[[Category:String Data]]
 +
[[Category:String Data Functions]]

Latest revision as of 13:53, 26 July 2010

Purpose

Function to fill an array with character strings that are separated with a specified character


Syntax

ASTORE(<array>, <expC1>, <expC2>)


See Also

AADD(), AAVERAGE(), ABROWSE(), ACHOICE(), ACOL(), ACOPY(), ADEL(), ADESC(), ADIR(), AELEMENT(), AFIELDS(), AFILL(), AINS(), ALEN(), ALINES(), AMAX(), AMIN(), APPEND FROM ARRAY, AROW(), ARRAY(), ASCAN(), ASIZE(), ASORT(), ASTRING(), ASUBSCRIPT(), ASUM(), COPY TO ARRAY, DBEDIT(), DECLARE, DIMENSION, GATHER, IN_ARRAY(), IS_ARRAY(), LOCAL, MENU AT, MENU BROWSE, MENU FIELDS, MENU FILES, MENU FROM, MENUITEM(), PRIVATE, PUBLIC, RELEASE, RESTORE, SAVE, SCATTER


Description

The ASTORE() function fills the <array> with character strings from <expC1> which are separated by the character specified in <expC2>. The array will be created if it has not been previously declared. For an existing array, the character strings are copied into the array elements until either all the elements are filled, or all the strings are copied and the length of the array is automatically shortened to the number of elements stored in it. The ASTORE() function returns the number of character strings copied into the array. The ASTORE() function is most commonly used in combination with menu commands where multiple selections can be made.


Example

declare aNums[10]
? alen(aNums)
        10
nelements = ASTORE(aNums, "one, two, three", ",")
? nelements
         3
? alen(aNums)
         3
// Another Example
menu fields select "+"
declare aMenu[512]
nelements = astore(aMenu, menuitem(), "+")


Products

Recital, Recital Server