AADD()

AADD()

Dynamically add an element to an array

Syntax

      AADD(<aArray>[, <xValue>]) --> Value

Arguments

<aArray> The name of an array

<xValue> Element to add to array <aArray>

Returns

<Value> if specified <xValue>, <xValue> will return , otherwise this function returns a NIL value.

Description

This function dynamically increases the length of the array named <aArray> by one element and stores the value of <xValue> to that newly created element.

<xValue> may be an array reference pointer, which in turn may be stored to an array’s subscript position.

Examples

      LOCAL aArray := {}
      LOCAL x
      AAdd( aArray, 10 )
      FOR x := 1 TO 10
         AAdd( aArray, x )
      NEXT
      // Result is: { 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }

Compliance

Clipper

Files

Library is vm

Seealso

AINS(), ASIZE()

Advertisements

3 responses to “AADD()

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

  2. Pingback: Harbour Array Functions | Viva Clipper !

  3. 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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.