Jump to content

Nested Logic


Go to solution Solved by larryllix,

Recommended Posts

Posted

I'm trying to do the equivalent of "IF Button1 is Switched On AND (variable1=1 OR variable2=1) THEN Do this" but using the And (.. ) or Or (.. ) in programs I can't seem to get it right.  I got this to work once somewhere but I don't know how I did it.  How do you use "Add And (..)" and/or "Add Or(..)" to create nested logic like I mention above?  I've too tried playing with "Move Line Up" and "Move Line Down" but just can't get it right.  What's the trick to "Add And (..)" and "Add Or (..)"?  Thanks.

  • Solution
Posted

Did you know there are two ANDs and two ORs. Individual lines can each have their own AD/OR logic and there are also two distinct and separate AND and OR buttons that are used with parenthesis. Then you can move each bracket up and down to where you like.

Posted
10 hours ago, larryllix said:

Did you know there are two ANDs and two ORs. Individual lines can each have their own AD/OR logic and there are also two distinct and separate AND and OR buttons that are used with parenthesis. Then you can move each bracket up and down to where you like.

Thanks.  Yea, it took a little practice moving the statements and/or brackets up and down to get it right.  I'm just used to "free-form" using brackets and logic in a "one-liner" like you'd do in Java or other languages.

  • Like 1
Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...