Overview
| Artifact ID: | cb7723a824beb250283540c1d7752fe9c9bf240b |
|---|---|
| Ticket: | 447296ffffffffffffffffffffffffffffffffff
commented if statement are evaluated |
| User & Date: | msofer on 2001-08-03 04:48:39 |
Changes
- assignee changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 You are not actually commenting the ifelse clause. What is happening here is that the parser sees if expr1 body1 elseif expr2 body2 else body3 with scripts <body1> and <body2> defined as: * body1 -> \n <action1> \n # * body2 -> \n # <action2> \n The '}' after the first '#' represents the end of the script <body1>; commenting ends right there. I'm hesitant to call this a "bug", as opposed to a "mis-documented feature". The docs say (rule [9]): "If a hash character (``#'') appears at a point where Tcl is expecting the first character of the first word of a command, then the hash character and the characters that follow it, up through the next newline, are treated as a comment and ignored." Maybe the docs should be more explicit and say instead: " ..., up through the next newline or end-of-script (whichever comes first), ..." or something to that effect. However, this particular description looks even more confusing to me.
- login: "msofer"
- mimetype: "text/plain"
- subsystem changed to: "45. Parsing and Eval"
- username: "msofer"