Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 266a9c3f21cc0b497a1497945ae9cd5bbd6d076a
Ticket: 218240ffffffffffffffffffffffffffffffffff
Syntax error due to commented out line of TCL.
User & Date: nobody on 2000-10-26 00:54:57
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 2791 Bug
    Version: 8.2
    SubmitDate: '1999-09-16'
    LastModified: '1999-09-16'
    Severity: MED
    Status: Closed
    Submitter: techsupp
    ChangedBy: hobbs
    OS: Solaris
    Machine: Other
    FixedDate: '2000-10-25'
    ClosedDate: '1999-09-16'
    
    
    Name:
    
    Louis Petro
    
    
    
    Comments:
    
    Yes - one other question.  Is there anyway in TCL to know the current
    
        line number and possible the file name.  I'd like to use this
    
        information for debugging similiar to the __LINE__ and __FILE_ used by
    
        the C programming language.
    
    
    
    ReproducibleScript:
    
    set x 0
    
        
    
        while { $x < 10 } {
    
        # while { $x < 21 } {
    
        incr x
    
        }
    
    
    
    ObservedBehavior:
    
    User in our organization tend to copy code and comment out code alot.
    
        We've found that commented code is still being syntactically
    
        check by TCL.  In the above example user's we receive a syntax error
    
        unless the commented out code is syntactically complete, e.g.,
    
        
    
        # while { $x < 21 } { }
    
        
    
        Has this problem been identified?
    
    
    
    DesiredBehavior:
    
    I;d expect that a commented line would be treated as a comment in TCL.
    
    
    
    PatchFiles:
    
    I found that if the commented line is outside the loop above it then
    
        does not after the "while" loop.
    
        
    
        set x 0
    
        
    
        #while { $x < 21 }
    
        while { $x < 10 } {
    
        incr x
    
        }
    
    
    
    
    
    This is the comment problem cropping up again, and this was answered
    in the newsgroup (cover large blocks with if 0 { }). 
    -- 09/16/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: "Syntax error due to commented out line of TCL."
  11. type changed to: "Bug"