AIns()

 

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

Advertisements

4 responses to “AIns()

  1. Pingback: How I can insert new item to an array ? | Viva Clipper !

  2. Pingback: Harbour All Functions — A | Viva Clipper !

  3. Pingback: Harbour Array Functions | Viva Clipper !

  4. Pingback: Harbour RG Summary | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s