view
v
sorton
cols...
=> view
|
v
|
|
input view
|
|
cols...
|
|
column and order specifiers
|
Sorton is a generalized version of {sort} which sorts v
according to cols.... Sorting is stable, i.e. rows will remain in
the same order as in v if they are identical on the sort columns.
Apart from specifying columns, the cols... arguments can also include
special "+" and "-" markers indicating that all subsequent columns are
to be sorted in ascending or descending order, respectively.
Examples:
set v [view {A B} def {B a B b A c A b C b}]
view $v sorton A
view $v sorton - A
view $v sorton A B
view $v sorton A - B
view $v sorton - B + A
(sorton is defined in Ratcl)