ADelT Function (Array OfT, DWord) | |
Delete an array element.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION ADel<T>(
aTarget AS ARRAY OF<T>,
dwPosition AS DWORD
)
AS ARRAY OF<T>
public static Array Of<T> ADel<T>(
Array Of<T> aTarget,
uint dwPosition
)
Request Example
View SourceParameters
- aTarget
- Type: Array OfT
The array to delete an element from. - dwPosition
- Type: DWord
The position of the element to delete.
Type Parameters
- T
- The type of the array elements
Return Value
Type:
Array OfT
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