1 Reply Latest reply on Apr 8, 2014 10:40 AM by philmodjunk

    Calculation operator usage

    ultranix

      Title

      Calculation operator usage

      Post

           Hey, it may sound simple, but I got stuck onto it:

           I have If conditional sentence, where I use "and"; "or" operators.

           

                If (start = "Start" and calc_1 > calc_0 or bottom > middle_b; "Breakout")

           then this sentence is followed by similar If sequences, but here what I wanted to know. How to construct sentence, that it would be considered TRUE, if, according to above shown example, only when start = "Start" and either calc1 > calc_0 or bottom > middle_b would be TRUE, only then it would the whole statement would be TRUE. Now it just doesn't work. It now takes either 1 of 3 conditions, and if it's TRUE, then the whole sentence becomes true.

        • 1. Re: Calculation operator usage
          philmodjunk

               Boolean operators (and, or, xor...) evaluate left to right just like any other calculation operator at the same order of precedence unless you use parenthesis to force a different order of operations. It sounds like you need:

               If (start = "Start" and ( calc_1 > calc_0 or bottom > middle_b ) ; "Breakout")