<<< Date Index >>>     <<< Thread Index >>>

Re: Little code cleanup



On 2008-03-03 08:44:37 -0500, Thomas Dickey wrote:

> Not literally "if (1)".  

Leaving out the good old

        do {
        
          ...
          break;
       
        } while (0);

construct.

> But "if (foo)" where "foo" may be a constant expression is
> inarguably a valid way to construct code...

Indeed, it is -- in particular if (like in this case, I believe) the
code which makes foo constant might change in the future in a way
that would make foo non-constant.

-- 
Thomas Roessler   <roessler@xxxxxxxxxxxxxxxxxx>