ATailT Function (Array OfT) | |
Return the highest numbered element of an array.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION ATail<T>(
aTarget AS ARRAY OF<T>
)
AS T
public static T ATail<T>(
Array Of<T> aTarget
)
Request Example
View SourceParameters
- aTarget
- Type: Array OfT
The array.
Type Parameters
- T
- The type of the array elements
Return Value
Type:
T
The contents of the last array element.
Remarks
ATail() returns the highest numbered element of an array.
It can be used in applications as shorthand for aArray[ALen(aArray)] when you need to obtain the last element of an array.
Examples
The following example creates a literal array and returns the last element of the array:
1aArray := {"a", "b", "c", "d"}
2? ATail(aArray)
See Also