ADEL()
Delete an element form an array.
Syntax
ADEL(<aArray>, <nPos>) --> aTarget
Arguments
<aArray> Name of array from which an element is to be removed.
<nPos> Subscript of the element to be removed.
Returns
<aTarget> an array pointer reference.
Description
This function deletes the element found at <nPos> subscript position in the array <aArray>. All elements in the array <aArray> below the given subscript position <nPos> will move up one position in the array. In other words, what was formerly the sixth subscript position will become the fifth subscript position. The length of the array <aArray> will remain unchanged, as the last element in the array will become a NIL data type.
Examples
LOCAL aArray := { "Harbour", "is", "Power" } ADel( aArray, 2 ) // Result: aArray is { "Harbour", "Power" }
Compliance
Clipper
Files
Library is vm
Seealso
ACOPY(), AINS(), AFILL()
Pingback: How I can delete an item … | Viva Clipper !
Pingback: Harbour All Functions — A | Viva Clipper !
Pingback: Harbour Array Functions | Viva Clipper !
Pingback: Harbour RG Summary | Viva Clipper !