E9.2 If Statement with an OR and AND....

FrankCLT

Active Member
Hello,

Can someone please clarify the statement below...


If A is not equal to "1" Or A is equal to "1" And B is greater than 0
Do Something
Else
Do Something Else
Endif

Thanks,
FrankCLT
 

Ryan...

Member
With OR statements everything on either side of it can be true. It's functionally the same to to make this
A != 1 OR A = 1 AND B > 0
look like this
A != 1 OR (A = 1 AND B > 0)

So when I look at a statement like that I tend to simplify all the AND statements first.
 
Top