Skip to content
Tcl Source Code History Of Ticket 2817506fffffffffffffffffffffffffffffffff
Login

History Of Ticket 2817506fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 2817506fffffffffffffffffffffffffffffffff

  1. Ticket change [f8eceb5e7b] (rid 91619) by sletts on 2009-07-06 16:04:06:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Problem also shows up in 8.6.b, not there in 8.4.4. Tested on Windows, Linux (32 & 64 bit) & Solaris.
      
      Many list handling routines return the first element of a list incorrectly when that element starts with #.
      
      Maybe the behaviour is due to a meaning of the # symbol that I don't know about or maybe it's a bug.
      At any rate it's different in 8.5 & 8.6 from 8.4.
      
      
      The problem can be demonstrated trivially. N.B. list and lrange are not the only routines that show this.
      
      set l00 {#1 #2 #3 #4}
      => #1 #2 #3 #4
      set l01 [list #1 #2 #3 #4]
      => {#1} #2 #3 #4
      
      set l02 [lrange $l00 0 end]
      => {#1} #2 #3 #4
      
      set l10 {1 #2 #3 #4}
      => 1 #2 #3 #4
      set l11 [list 1 #2 #3 #4]
      => 1 #2 #3 #4
      
      set l12 [lrange $l10 0 end]
      => 1 #2 #3 #4
      set l13 [lrange $l11 0 end]
      => 1 #2 #3 #4
      
      set l14 [lrange $l10 1 end]
      => {#2} #3 #4
      set l15 [lrange $l10 1 end]
      => {#2} #3 #4
      
      
      One workaround for these simple examples is to rebuild the list using append.
      
      for {set i 0} {$i < [llength $l02]} {incr i} {
         append l03 " " [lindex $l02 $i]
      }
      puts stdout $l03
      => #1 #2 #3 #4
      
      
      I've now noticed another oddity in this area.
      
      concat $l02 $l02
      => {#1} #2 #3 #4 #1 #2 #3 #4
      but
      concat $l03 $l03
      => #1 #2 #3 #4 {#1} #2 #3 #4
      
      
      
    4. foundin initialized to: "obsolete: 8.5.7"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "sletts"
    10. subsystem initialized to: "17. Commands I-L"
    11. title initialized to:
      list handling routines return the first element of a list in
      
    12. type initialized to: "Bug"
  2. Ticket change [507b619baf] (rid 125979) by dgp on 2009-07-07 01:07:51:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2009-07-06T18:07:51"
    3. closer changed to: "dgp"
    4. icomment:
      
      
      allow_comments - 1
      
      From the changes file:
      
       * [TIP #148] correct [list]-quoting of the '#' character
           *** POTENTIAL INCOMPATIBILITY ***
         For scripts that assume a particular (buggy) string rep for lists.
      
      See TIP 148 and Tracker ID 489537 for the history of this bug fix.
      
      http://www.tcl.tk/cgi-bin/tct/tip/148
      
      https://sourceforge.net/tracker/index.php?func=detail&aid=489537&group_id=10894&atid=210894
      
      If you have scripts that are bug-dependent on this bug, fix them
      as part of moving to Tcl 8.5.
      
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Invalid"
    8. status changed to: "Closed"
    9. username: "dgp"