AINS()

From Recital Documentation Wiki
Revision as of 15:37, 1 June 2009 by Yvonnemilne (Talk | contribs)

Jump to: navigation, search

Class

Array Processing


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(), ASCAN(), ASIZE(), ASORT(), ASTORE(), ASTRING(), ASUBSCRIPT(), ASUM(), COPY TO ARRAY, DECLARE, DIMENSION, GATHER, 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 Database Server, Recital Mirage Server, Recital Terminal Developer