Artifacts Associated With Ticket 817048ffffffffff
Ticket change [15d945b90d] (rid 124633) by rmax on 2003-10-03 10:33:09:
- assignee initialized to: "hobbs"
- cmimetype initialized to: "text/plain"
- comment initialized to:
According to rule 5 of the Tcl syntax the sequence \\} would have to be treated as one literal backslash followed by an escaped closing brace when it appears between curly braces. But instead the parser treats it as two literal backslashes followed by an unescaped closing brace. So either the documentation or the implementation is wrong.
- foundin initialized to: "obsolete: 8.4.4"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "rmax"
- subsystem initialized to: "45. Parsing and Eval"
- title initialized to: "Backslashes at the end of braced words"
- type initialized to: "Bug"
Ticket change [cd3140f935] (rid 95845) by rmax on 2003-10-03 18:30:27:
- title changed to: "Backslashes inside curly braces"
Ticket change [e9f4f69ae3] (rid 104896) by dgp on 2003-10-03 20:27:02:
- assignee changed to: "dgp"
Ticket change [f416a2f2ee] (rid 129838) by dgp on 2003-10-04 05:04:58:
- assignee changed to: "rmax"
- closedate changed to: "2003-10-03T22:04:58"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 When scanning a brace quoted word, backslash substitution is not performed, but each backslash sequence is scanned as a unit. This detail might not be completely obvious from the documentation, but it is required in order to only do backslash-newline substitution in the correct places. proc foo {} { set backslash \\ } We don't want the backslash-newline here converted to a space. So the second backslash has to be tied to the first as a unit during parsing. If you have a proposed improvement to the docs to make this clearer without making it confusing, I'd consider it. - login: "dgp"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "dgp"
Ticket change [d37640608a] (rid 123294) by pascalscheffers on 2003-10-04 14:19:14:
- icomment:
Logged In: YES user_id=582857 If it is just a docs update, I think it is important to note there that it is not possible to construct a string that ends in a single or any odd number of backslashes. Meaning you cannot make a DOS path ending in a backslash in curly braces: {c:\somewhere\} doesn't work. Nor does {c:\somewhere\\}, which produces c:\somewhere\\ I know you should not do it this way, but it has bit me before. - login: "pascalscheffers"
- mimetype: "text/plain"
- username: "pascalscheffers"
- icomment:
Ticket change [c598e1a89e] (rid 112026) by dgp on 2003-10-05 01:54:53:
- icomment:
Logged In: YES user_id=80530 Just to clarify, there's no limit on your ability to construct a string in Tcl that ends in an odd number of backslashes. You just can't brace-quote such a string. (Because it would escape the closing } ) You also can't ""-quote such a string for the same reason. So in this corner case, you're stuck either using all \-quoting or, more likely, using substitution to generate the string you need. set bs \\ set myString "foo bar$bs"
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment: