Nesting operators

Top  Previous  Next

Sometimes it is desirable to use complex logical conditions where several things are simultaneously true or at least one of several things.  This can be done by combining conditions using logical operators or complex (nested) $ conditions.  The logical operators are And, Or, Xor and Not along with nested $ conditions.

 

And -perform an action if two or more conditionals are true simultaneously
Orperform an action if at least one of two or more conditionals are true
Xorperform an action if only one of two or more conditionals are true
Notdo something when a conditional is not true
Nested $statements can involve multiple $ conditions

 

Each is discussed below.