[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tcl comments and if statements
> Date: Sat, 29 Jul 2000 12:45:36 -0700 (PDT)
> From: Erik Machnicki <machnick@bmrc.berkeley.edu>
> To: Openmash <openmash-users@openmash.org>
> Subject: Tcl comments and if statements
> MIME-Version: 1.0
>
> Tcl seems to have the strange problem of not really ignoring commented-out
> "if" statements. Specifically, if you have braces that are commented out,
> it will complain of unbalanced braces.
>
> The code:
>
> # if { is-hardware-encode } {
> if { 0 } {
> ...
> }
>
> will fail, because there is no closing brace for the commented out
> first "if".
>
I don't understand why this is a strange problem. It looks perfectly
natural to me, as there will in fact be an extra "}" brace if you
comment out the "if" statement. It seems clear that the corresponding
"}" should be commented out as well. Is there something I'm missing?
Greg Cook
cook@purdue.edu
> I fixed a couple of files in the repository that have this problem. Just
> thought I'd warn people.
>
> Erik
>