Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 76a82da9dbea703a50ee3cc2a6a0379ef20df399
Ticket: 785392ffffffffffffffffffffffffffffffffff
split command:
User & Date: dgp on 2003-08-08 22:28:24
Changes

  1. assignee changed to: "dgp"
  2. closedate changed to: "2003-08-08T15:28:24"
  3. closer changed to: "dgp"
  4. icomment:
    Logged In: YES 
    user_id=80530
    
    
    Your example script has one command, [proc].
    
    Its first argument is "bug"
    Its second argument is "" (empty string)
    To determine the third argument, the parser
    sees that it is quoted with a leading "{" so it
    starts scanning the text for the matching "}"
    that marks the end of the word.
    
    0
    {
                                              1              1
    Text "hello how are you { see you}"
                                         1    2
    msglines [split $text "{" ] {
    set msgline($linenumber) $msglines
                                   2
    incr linenumber 1}
          2         2 2                           2 2          2 2
    for {set f 0} {$f <$linenumber} {incr f 1} {
                                                               
               2
    puts $config $msgline($f);puts $config $f}
    1
    } 
    
    
    ...and your script ends without providing the
    closing "}" to end the third argument.
    
    The correct fix is to use backslash-quoting to
    mark those "{" and "}" characters that the parser
    should not count.  So change the [split] line above
    to
    
        msglines [split $text \{ ] {
    
    
    
  5. login: "dgp"
  6. mimetype: "text/plain"
  7. resolution changed to: "Invalid"
  8. status changed to: "Closed"
  9. subsystem changed to: "45. Parsing and Eval"
  10. username: "dgp"