up previous next
Last

the last N elements of a list
Syntax

Last(L:LIST):OBJECT
Last(L:LIST,N:INT):OBJECT


Description
In the first form, the function returns the last element of L. In the second form, it returns the list of the last N elements of L.

Example
L := [1,2,3,4,5];
Last(L);
5
-------------------------------
Last(L,3);
[3, 4, 5]
-------------------------------


See Also