Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: abeebf93f198054ee45b31aa731861707a2ddbb78511eb209773dd1fc6002a87
Ticket: 3a24cc9df1619a130120e8cef8560aef0561c1f0
Switch statement case fails when using a open parenthesis in a comment
User & Date: mookie on 2025-04-12 22:42:59
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-plain"
  4. comment changed to:
    Example code:
    
    proc yay {lang} {
        switch $lang { 
            tcl { 
    	    puts "Yay! TCL"
                # having a a { will break this case now
            }
        }
    } ;# end proc
    
    yay "tcl"
    
    Not sure feature, or bug, so feel free to close, but surely a comment is a comment and shouldn't be executed?
    
    I recall correctly it's down to that switch cases are executed as lists. But something feels eery that you can't use a { in a comment.
    
  5. foundin changed to: "9.x"
  6. is_private changed to: "0"
  7. login: "mookie"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "eb7513005aa11dbe2a07d8bff76f8af3c25f379b"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "mookie"
  14. subsystem changed to: "69. Other"
  15. title changed to:
    Switch statements case statements fail with open parentheis in comments
    
  16. type changed to: "Bug"