ADEL() Delete an array element ------------------------------------------------------------------------------ Syntax ADEL(<aTarget>, <nPosition>) --> aTarget Arguments <aTarget> is the array to delete an element from. <nPosition> is the position of the target array element to be deleted. Returns ADEL() returns a reference to the target array, <aTarget>. Description ADEL() is an array function that deletes an element from an array. The contents of the specified array element is lost, and all elements from that position to the end of the array are shifted up one element. The last element in the array becomes NIL. Warning! Clipper implements multidimensional arrays by nesting arrays within other arrays. If the <aTarget> array is a multidimensional array, ADEL() can delete an entire subarray specified by <nPosition>, causing <aTarget> to describe an array with a different structure than the original. Examples . This example creates a constant array of three elements, and then deletes the second element. The third element is moved up one position, and the new third element is assigned a NIL: LOCAL aArray aArray := { 1, 2, 3 } // Result: aArray is // now { 1, 2, 3 } ADEL(aArray, 2) // Result: aArray is // now { 1, 3, NIL } Files Library is CLIPPER.LIB.
See Also: ACOPY() AFILL() AINS()