AINS()
Purpose
Function to insert an element into an array
Syntax
AINS(<array>, <expN> [, <exp>])
See Also
AADD(), AAVERAGE(), ABROWSE(), ACHOICE(), ACOL(), ACOPY(), ADEL(), ADESC(), ADIR(), AELEMENT(), AFIELDS(), AFILL(), ALEN(), AMAX(), AMIN(), APPEND FROM ARRAY, AROW(), ARRAY(), ASCAN(), ASIZE(), ASORT(), ASTORE(), ASTRING(), ASUBSCRIPT(), ASUM(), COPY TO ARRAY, DECLARE, DIMENSION, GATHER, IN_ARRAY(), IS_ARRAY(), LOCAL, PRIVATE, PUBLIC, RELEASE, RESTORE, SAVE, SCATTER
Description
The AINS() function inserts an element into the <array> at the position of <expN>. The element will be defined as .F. unless an optional <exp> is included. All elements higher than the inserted element are shifted up and the contents of the last element are overwritten. The total number of elements in the array remains the same. The array must have been previously declared.
Example
declare table[10] ains(table, 3, "hello world") // Another Example declare flist[5] ... if ascan(flist, "new information") = 0 ains(flist,1,"new information") endif
Products
Recital Server, Recital