Difference between revisions of "AINS()"

From Recital Documentation Wiki
Jump to: navigation, search
(Products)
Line 29: Line 29:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 
[[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 15:49, 26 November 2009

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(), 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