Skip to content
Tcl Source Code History Of Ticket 1834653fffffffff
Login

History Of Ticket 1834653fffffffff

Artifacts Associated With Ticket 1834653fffffffff

  1. Ticket change [74d1e095fd] (rid 105282) by tlemeunier on 2007-11-19 17:10:56:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Try the following:
      
      if { 0 } {
        puts "00"
      #} elseif { 1 } {
      # puts "11"
        puts "22"
      }
      
      It prints '22' !
      
      I did not try the newest 8.4, but I guess it would be the same.
      
      Regards
      
      
    4. foundin initialized to: "obsolete: 8.4.13"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "tlemeunier"
    10. subsystem initialized to: "45. Parsing and Eval"
    11. title initialized to: "Funny comments"
    12. type initialized to: "Bug"
  2. Ticket change [8ba0a6441b] (rid 127599) by msofer on 2007-11-20 00:34:55:

    1. closedate changed to: "2007-11-19T17:34:55"
    2. closer changed to: "msofer"
    3. icomment:
      Logged In: YES 
      user_id=148712
      Originator: NO
      
      That is correct behaviour: braces are parsed before comments in Tcl. This is contrast to C, where comments are removed by the preprocessor before any parsing occurs.
      
      Your code is understood exactly as if it were written
        if { 0 } {
          puts "00"
          #
        } elseif { 1 } {
          # puts "11"
          puts "22"
        }
      }
      
      Please refer to the Tcl.n man page (http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm) and/or the wiki (http://wiki.tcl.tk/462).
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"
    8. username: "msofer"