ATail Function (Array) | |
Return the highest numbered element of an array.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION ATail(
aTarget AS ARRAY
) AS USUAL
public static Usual ATail(
Array aTarget
)
Request Example
View SourceParameters
- aTarget
- Type: Array
The array.
Return Value
Type:
Usual
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