268
SIZE({list}) and SIZE(matrix)
This function returns the size of the list or matrix specified. Since normal
users would probably know anyway, and could find out easily via the list
catalog, this is clearly another of those functions which are of more use to
programmers (who won’t know when they write their program just how long
the list you will ask it to deal with will be when you eventually run the
program). If the object is a matrix then the return value is a two element list
as {rows, columns}.
Σ
LIST({list})
This function returns the sum of all the elements of a list.
Eg.
LIST({2,3,5})
would return a value of 10.
REVERSE({list})
This function reverses the order of elements in
a list.
Eg.
REVERSE({2,4,1,7,10})
would
return
{10,7,1,4,2}
SORT({list})
This function returns a list that is sorted into
ascending order.
If you want the list in descending order instead
then use
REVERSE(SORT({list}))
.
See page 147 for an example of using
SORT
to assign rank orders.