Jean-Marc Lasgouttes wrote:
> Lars> Like this perhaps:
> 
> +     int foo = (forba() == hans ? some1() : some2());
> +     -NOT-
> +     int foo = forba() == hans ? some1() : some2();
> 
> I would think that
> +     int foo = (forba() == hans) ? some1() : some2();
> is clearer in this case. Is it just me?

Nope. I often write:
        int const foo = (a == b) ?
                case1 :
                case2;

I think that parentheses around the whole lot will just lead to confusion.

-- 
Angus

Reply via email to