Skip to content
Tcl Source Code History Of Ticket 219119ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 219119ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 219119ffffffffffffffffffffffffffffffffff

  1. Ticket change [2b6fccb1a7] (rid 118741) by nobody on 2000-10-26 01:11:03:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. 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
      
      
      
    4. foundin initialized to: "obsolete: 8.4a1"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "81. Bundled Packages"
    10. title initialized to:
      some order of options to lsort results in strange error
      
    11. type initialized to: "Bug"
  2. Ticket change [d7fa6e193a] (rid 107362) by welch on 2000-10-26 08:34:57:

    1. closedate changed to: "2000-10-26T01:34:57"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [a191cd187e] (rid 109743) by dgp on 2001-04-05 08:02:00:

    1. closedate changed to: "2001-04-05T01:02:00"
    2. closer changed to: "dgp"
    3. subsystem changed to: "17. Commands I-L"