sort structure by field
Description
L sortf(X, i)
sortf(X, i) produces a sorted list of the values from the record, list or set, X.
List and record values in X are ordered by comparing the values of their ith fields. The value of i can be negative but not zero. Two structure values in X having equal ith fields are ordered as they would be in regular sorting, but structures lacking an ith field appear before structures having them.
Parameters
- X
- list, set or record
- i
- 1 based field number
- L
- sorted elements of X
Defaults
- i
- 1
Errors
101 |
i is not an integer |
125 |
X is not list, set or record |
205 |
i = 0 |
See Also