documentation "bug" with Tcl.n
Closed / Fixed2901433fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2009-11-20 21:46:16
Tcl.n says:
If a word starts with the string “{*}” followed by a non-whitespace character, then the leading “{*}” is removed and the rest of the word is parsed and substituted as any other word. After substitution, the word is parsed again without substitutions, and its words are added to the command being substituted. For instance, “cmd a {*}{b c} d {*}{e f}” is equivalent to “cmd a b c d e f”.
After talking with dgp on irc, and trying to explain this to someone helping out on partcl, I think this is a slight bug in the docs. Given the example:
% puts {*}{abc\ndef}
abc
def
We can see that there is another step happening here, as a result of treating the arguments to expand as a list.
I would suggest perhaps that
the word is parsed again without substitutions, and its words
Might be more accurate as:
the word is converted to a list, and the elements of that list
(Bikeshedding on the actual text welcome, but I think we should mention "list" in here somewhere.)
dkfplain2009-11-30 22:40:48
Needs backport to 8.5
dkf Ticket [2901433fff]: 4 changes
[History diff]2009-11-30 22:40:49
dkfplain2009-11-30 22:44:46
allow_comments - 1 done
Log in (anonymous is fine) to add a comment.