Artifacts Associated With Ticket 2817506fffffffffffffffffffffffffffffffff
Ticket change [f8eceb5e7b] (rid 91619) by sletts on 2009-07-06 16:04:06:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- 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 - foundin initialized to: "obsolete: 8.5.7"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "sletts"
- subsystem initialized to: "17. Commands I-L"
- title initialized to:
list handling routines return the first element of a list in
- type initialized to: "Bug"
Ticket change [507b619baf] (rid 125979) by dgp on 2009-07-07 01:07:51:
- assignee changed to: "dgp"
- closedate changed to: "2009-07-06T18:07:51"
- closer changed to: "dgp"
- 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. - login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- username: "dgp"