Artifacts Associated With Ticket 219119ffffffffff
Ticket change [2b6fccb1a7] (rid 118741) by nobody on 2000-10-26 01:11:03:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 6212 Bug Version: 8.4a1 SubmitDate: '2000-09-05' LastModified: '2000-09-17' Severity: LOW Status: Released Submitter: techsupp ChangedBy: ericm OS: All FixedDate: '2000-09-17' FixedInVersion: 8.4a2 ClosedDate: '2000-10-25' Name: Harald Kirsch ReproducibleScript: # run this script. proc cmplen {a b} { return [expr {[string length $a] - [string length $b]}] } set S { {xxx "sdafkj "} {yyy "sf"} } puts [lsort -index 1 -command cmplen -decreasing $S] puts --------- puts [lsort -command cmplen -decreasing -index 1 $S] ObservedBehavior: Both lsort commands should work, but only the first one does. The 2nd gives the error invalid command name "1" while executing "1 {sdafkj } sf" (-compare command) invoked from within "lsort -command cmplen -decreasing -index 1 $S" invoked from within "puts [lsort -command cmplen -decreasing -index 1 $S] DesiredBehavior: No error should occur. Patch from Kuchler (needs tests as well): The following change to the current CVS 8.4 sources will fix the problem. For those working off of an older version, simpley remove the 'cmdPtr = objv[i+1];' line from tclCmdIL.c in the function Tcl_LsortObjCmd in the handling for the '-index' flag in the argument processing for loop. diff -c -r1.27 tclCmdIL.c *** tclCmdIL.c 2000/05/27 23:58:01 1.27 --- tclCmdIL.c 2000/09/05 08:07:06 *************** *** 2759,2765 **** != TCL_OK) { return TCL_ERROR; } - cmdPtr = objv[i+1]; i++; break; case 6: /* -integer */ --- 2759,2764 ---- -- 09/05/2000 hobbs I applied this patch and added test cases for it. The fix will be included in Tcl 8.4a2. Nice work, everybody. Eric Melski The Other Tcl Guy ericm at ajubasolutions.com Ajuba Solutions -- 09/17/2000 ericm - foundin initialized to: "obsolete: 8.4a1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "81. Bundled Packages"
- title initialized to:
some order of options to lsort results in strange error
- type initialized to: "Bug"
Ticket change [d7fa6e193a] (rid 107362) by welch on 2000-10-26 08:34:57:
- closedate changed to: "2000-10-26T01:34:57"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [a191cd187e] (rid 109743) by dgp on 2001-04-05 08:02:00:
- closedate changed to: "2001-04-05T01:02:00"
- closer changed to: "dgp"
- subsystem changed to: "17. Commands I-L"