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
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- 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 - foundin changed to: "obsolete: 8.2"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "69. Other"
- title changed to:
tcl finds close braces when they are in commented lines
- type changed to: "Bug"