Jump to content

Nested Logic


GJ Software Products

Recommended Posts

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.

Link to comment

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.

Link to comment
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.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...