cuthead
cuthead |
Purpose
Synopsis
procedure cuthead(l:list, o:integer)
Arguments
l
|
A list
|
o
|
Number of elements to remove if >0 or number of elements to keep if <0
|
Example
L:=[1,2,3,4,5] cuthead(L,2) ! => L=[3,4,5] cuthead(L,-1) ! => L=[5]
Further information
If the second parameter is 0, the list is unchanged. If the same parameter is larger than the size of the list, all elements are deleted.
Related topics