Click or drag to resize

ATailT Function (Array OfT)

X#
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
Request Example View Source

Parameters

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:
X#
1aArray := {"a", "b", "c", "d"}
2? ATail(aArray)            // d
See Also