Tcl command "mlsort"

Multi-list sort

It is intended as a sort of a list of lists

You can sort on more than a field of the internal list
If the first check returns equal, the next one will be applied

Anyhow, the order of the elements that are equal by all the checks will be preserved


Index:


Input types

TInListEl
list of
string

TInList
list of
TInListEl

TSpecEl
record
index
natural

Index in the array on which to sort

method
string

Comparison method

If it is not one of the following, it is considered a command
(To compare two elements, evaluate a Tcl script consisting of method with the two elements appended as
additional arguments. The script should return an integer less than, equal to, or greater than zero if the first element is to be considered less than, equal to, or
greater than the second, respectively.

The special methods are:
'int' - increasing integer
'-int' - decreasing integer
'nat' - increasing natural
'-nat' - decreasing natural
'compact' - increasing compact (see tl)
'-compact' - decreasing compact (see tl)
'hex' - increasing hex
'-hex' - decreasing hex
'octal' - increasing octal
'-octal' - decreasing octal
'binary' - increasing binary
'-binary' - decreasing binary
'real' - increasing real
'-real' - decreasing real
'intreal' - increasing real
'-intreal' - decreasing real
'str' - increasing string
'-str' - decreasing string

TSpec
list of
TSpecEl


Output types

TOutList
list of
string


Commands

mlsort spec inlist
Input:
spec
TSpec

Specification string

inlist
TInList

List of lists that must be sorted

Output:
TOutList

C function:
tl_f_mlsort

Multi-list sort

It is intended as a sort of a list of lists

You can sort on more than a field of the internal list
If the first check returns equal, the next one will be applied

Anyhow, the order of the elements that are equal by all the checks will be preserved


Generated Fri 26. Feb 1999 19:15:40 from a tl file.
Do not modify by hand!