Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2b82a2ea154260f2d612811be86230bb825a00e1
Ticket: 217905ffffffffffffffffffffffffffffffffff
tcl finds close braces when they are in commented lines
User & Date: nobody on 2000-10-26 00:45:43
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 2594 Bug
    Version: 8.2
    SubmitDate: '1999-08-20'
    LastModified: '1999-08-20'
    Severity: LOW
    Status: Closed
    Submitter: techsupp
    ChangedBy: hobbs
    RelatedBugIDs: 1367
    OS: Windows 98
    Machine: X86
    FixedDate: '2000-10-25'
    ClosedDate: '1999-08-20'
    
    
    Name:
    
    Devananda van der Veen
    
    
    
    CVS:
    
    8/18/99
    
    
    
    ReproducibleScript:
    
    button .b -text hello -command {
    
        puts "Hello"
    
        # this line should be ignored but its not }
    
        puts "and this will only print once"
    
        
    
        # but this line is ignored }
    
        
    
        pack .b
    
    
    
    ObservedBehavior:
    
    There is no close-brace to match the open-brace of the -command option.
    
        However, the script executes just fine, closing the -command section at
    
        the end of the second line, before the second puts command. Tcl must
    
        have read the "}" at the end of the commented line.... which it should
    
        not do! However, it does not give an error for wither of the other
    
        commented lines, which implies that Tcl only interprets close-braces in
    
        commented lines when there is a matching open brace.
    
    
    
    DesiredBehavior:
    
    Tcl should completely ignore lines that have been commented out.
    
    
    
    
    
    This is the expected behavior.  Brace balancing has precedent over
    comment detection, which can lead to programming errors like the
    above.  Compare with this perfectly legal statement:
        if {1} { puts hello; # I just puts'ed it }
    
    The parser will check that the if has two args first, then when
    true it will eval the body arg and see the two commands, the
    second being a comment.  
    -- 08/20/1999 hobbs
    
  4. foundin changed to: "obsolete: 8.2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to:
    tcl finds close braces when they are in commented lines
    
  11. type changed to: "Bug"