in reply to Re: Mixing OR with conditional operator
in thread Mixing OR with conditional operator

In algebra, 1 + 2 * 3 is always 7, not 6.

in what world would it ever be 6?

  • Comment on Re^2: Mixing OR with conditional operator

Replies are listed 'Best First'.
Re^3: Mixing OR with conditional operator
by soonix (Chancellor) on Nov 20, 2017 at 14:56 UTC
    in a world where you stand on your head   ,-)
    (and have different precedences, of course)
Re^3: Mixing OR with conditional operator
by Anonymous Monk on Nov 21, 2017 at 19:39 UTC
    I'm sure that was supposed to be "9" but the point is made. Anyhow, "parentheses are your bestest friend," and so is splitting a complicated expression into several smaller ones using temporary local variables. Write the source-code so that people can understand it at a glance. Compilers and interpreters can take care of themselves. Troubles begin when people mis-read what is put in front of them.