Skip to content
Tcl Source Code History Of Ticket 817048ffffffffff
Login

History Of Ticket 817048ffffffffff

Artifacts Associated With Ticket 817048ffffffffff

  1. Ticket change [15d945b90d] (rid 124633) by rmax on 2003-10-03 10:33:09:

    1. assignee initialized to: "hobbs"
    2. cmimetype initialized to: "text/plain"
    3. 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.
      
    4. foundin initialized to: "obsolete: 8.4.4"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "rmax"
    9. subsystem initialized to: "45. Parsing and Eval"
    10. title initialized to: "Backslashes at the end of braced words"
    11. type initialized to: "Bug"
  2. Ticket change [cd3140f935] (rid 95845) by rmax on 2003-10-03 18:30:27:

    1. title changed to: "Backslashes inside curly braces"
  3. Ticket change [e9f4f69ae3] (rid 104896) by dgp on 2003-10-03 20:27:02:

    1. assignee changed to: "dgp"
  4. Ticket change [f416a2f2ee] (rid 129838) by dgp on 2003-10-04 05:04:58:

    1. assignee changed to: "rmax"
    2. closedate changed to: "2003-10-03T22:04:58"
    3. closer changed to: "dgp"
    4. 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.
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. status changed to: "Closed"
    8. username: "dgp"
  5. Ticket change [d37640608a] (rid 123294) by pascalscheffers on 2003-10-04 14:19:14:

    1. 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.
      
      
      
      
    2. login: "pascalscheffers"
    3. mimetype: "text/plain"
    4. username: "pascalscheffers"
  6. Ticket change [c598e1a89e] (rid 112026) by dgp on 2003-10-05 01:54:53:

    1. 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"
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"