up previous next

Last

Syntax

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

Summary

the last N elements of a list

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