lappend undocumented behavior
Closed / Fixed1570718fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 20 years ago
Descriptionplain2006-10-04 14:23:00
% info patchlevel
8.5a5
% set a {"}
"
% llength $a
unmatched open quote in list
So far, just as expected.
% lappend a "abc"
unmatched open quote in list
Good
% lappend a
"
Whoops! Should have been an error here, shouldn't there?
Maybe it's returning a list?
% set b [lappend a]
"
% llength $b
unmatched open quote in list
Here's what bugs me - the l commands should only be
returning a list.
If lappend wants to return the string $a listified, I
could live with that. But returning a non-list seems
unexpected to me, and at the very least should be
documented...
msofer Ticket [1570718fff]: 2 changes
[History diff]2006-10-05 08:22:42
msoferplain2006-10-05 08:27:55
Logged In: YES user_id=148712 Something to ponder; not new in 8.5: just tested that 8.3.4 and 8.4.12 have the same behaviour.
msoferplain2006-10-05 17:52:49
Logged In: YES
user_id=148712
Tcl8.0 has the same error, and Tcl7.6 also does it wrong -
but differently.
% info patch
8.0.5
% set a {"}
"
% lappend a
"
% lappend a abc
unmatched open quote in list
% llength $a
unmatched open quote in list
% info patch
7.6p2
% set a {"}
"
% lappend a
"
% lappend a abc
" abc
% llength $a
unmatched open quote in list
msoferplain2006-10-05 18:41:09
Logged In: YES user_id=148712 Fixed in HEAD and 8.4
Log in (anonymous is fine) to add a comment.