Overview
| Artifact ID: | ad3ef2c2d6a64f378bbceab5378def0ef9db42c0 |
|---|---|
| Ticket: | 747083ffffffffffffffffffffffffffffffffff
lsearch -command tclcmd -group grpsize, lsort -group grpsiz |
| User & Date: | nobody on 2003-06-01 17:17:57 |
Changes
- assignee changed to: "nijtmans"
- cmimetype changed to: "text/plain"
- comment changed to:
improve lsearch by adding a -command tclcmd option to search list items using the same function as lsort e.g. set L [lsort -command CompareVector $L] set X [lsearch -sorted -command CompareVector $L] also some grouping would be great: think you have a list with every 4 items belong to a group and you wanna sort it by the third item: e.g. set L { a0 a1 a2 a3 b0 b1 b2 b3 c0 c1 c2 c3 .. } to sort using lsort you have to make a list of lists by set L2 {} foreach {a b c d} { lappend L2 [list $a $b $c $d] } set L2 [lsort -index 2 $L2] set L [concat $L2] a faster approach with the nonexisting -group option set L [lsort -group 4 -index 2 $L] searching such lists is required than as well so lsearch -group 4 -index 2 $L c2 will return 2 the group number (my favourite, or 10 as the real index, or 8 as the first member of the group) such grouped lists are very general in my opinion, because regexp,array get,split are functions that may return such lists finally a quick "lreverse list" command would be a nice idea. - foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: ""
- title changed to:
lsearch -command tclcmd -group grpsize, lsort -group grpsiz
- type changed to: "Support"