AINS()
Insert a NIL value at an array subscript position.
Syntax
AINS( <aArray>, <nPos> ) --> aTarget
Arguments
<aArray> Array name.
<nPos> Subscript position in <aArray>
Returns
<aTarget> an array pointer reference.
Description
This function inserts a NIL value in the array named <aArray> at the <nPos>th position.
All array elements starting with the <nPos>th position will be shifted down one subscript position in the array list and the last item in the array will be removed completely. In other words, if an array element were to be inserted at the fifth subscript position, the element previously in the fifth position would now be located at the sixth position. The length of the array <aArray> will remain unchanged.
Examples
LOCAL aArray := { "Harbour", "is", "Power!", "!!!" } AIns( aArray, 4 )
Compliance
Clipper
Files
Library is vm
Seealso
AADD(), ACOPY(), ADEL(), AEVAL(), AFILL(), ASIZE()
Pingback: How I can insert new item to an array ? | Viva Clipper !
Pingback: Harbour All Functions — A | Viva Clipper !
Pingback: Harbour Array Functions | Viva Clipper !
Pingback: Harbour RG Summary | Viva Clipper !