ADel Function (Array, DWord) | |
Delete an array element.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION ADel(
aTarget AS ARRAY,
dwPosition AS DWORD
) AS ARRAY
public static Array ADel(
Array aTarget,
uint dwPosition
)
Request Example
View SourceParameters
- aTarget
- Type: Array
The array to delete an element from. - dwPosition
- Type: DWord
The position of the element to delete.
Return Value
Type:
Array
A reference to
aTarget.
Remarks
When an element is deleted from an array, its content 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.
Examples
This example creates an array of three elements, then deletes the second element.
The third element is moved up one position, and the new third element is assigned a NIL:
1LOCAL aArray
2aArray := {1, 2, 3}
3ADel(aArray, 2)
See Also