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)
Status

Ready

Compliance

This function is CA Clipper compliant

Files

Library is vm

See Also