Overview
| Artifact ID: | fc8e5f1fc59ef30b49834e250112c04138d9e985 |
|---|---|
| Ticket: | 218043ffffffffffffffffffffffffffffffffff
tcl parses commented code. |
| User & Date: | nobody on 2000-10-26 00:52:30 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- 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 - foundin changed to: "obsolete: 8.0.4"
- 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 parses commented code."
- type changed to: "Bug"