getlast
| getlast | 
  Purpose
 
  
  Synopsis
 
 function getlast(r:range):integer
 function getlast(l:list):type_of_l
 
  Arguments
 
 | 
     r 
     | 
     A range set
     | 
| 
     l 
     | 
     A list
     | 
  Return value
 
 
 The last element of the set or list.
 
  Example
 
 
 In this example the range set
 r is defined before its first and last elements are retrieved and displayed:
 
 declarations
 r=2..8
end-declarations
  ...
writeln("First element of r: ", getfirst(r),
        "\nLast element of r: ", getlast(r))
  Further information
 
 
  When applied to a list, the type of the function is the type of the list. An error is generated if the argument of the function is empty.
 
 
  Related topics
 
  
