Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: fc8e5f1fc59ef30b49834e250112c04138d9e985
Ticket: 218043ffffffffffffffffffffffffffffffffff
tcl parses commented code.
User & Date: nobody on 2000-10-26 00:52:30
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 1367 Bug
    Version: 8.0.4
    SubmitDate: '1999-03-02'
    LastModified: '1999-08-07'
    Severity: SER
    Status: Closed
    Submitter: pat
    ChangedBy: hobbs
    OS: Windows 95
    Machine: X86
    FixedDate: '2000-10-25'
    ClosedDate: '1999-08-07'
    
    
    Name:
    
    john f. davis
    
    
    ReproducibleScript:
    
    I had some code which was commented out, but the interpeter gave me an error 
    
    on code which was commented out.
    
    
    #      for {foo} {foo) {foo} {
    
    
    ObservedBehavior:
    
    The interpeter said there was a missing brace.  Didn't tell me where in the code it was, so i started commenting out lines a line at a time.  I still got errors
    
    even though the code with the error was commented out.   The error was that the 
    
    second {} group in the for loop had a ")" instead of a "}".
    
    
    DesiredBehavior:
    
    I expected the missing-brace error to tell me a line number first of all.  Second, I expected that the code would be ignored when 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/07/1999 hobbs
    
  4. foundin changed to: "obsolete: 8.0.4"
  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 parses commented code."
  11. type changed to: "Bug"