Boolean Examples Part 1

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

An example of such an expression - complete with the expected action if the result is True - is below:

 

I will eat at a restaurant if “the food is good quality” AND “the servers are friendly” AND “the cost is under $10”.

 

In this example the action is explicitly stated as "I will eat at a restaurant".  That will happen "if" the expression (which includes three statements) is True.  Because each statement is linked by an AND, all of them must be true for the expression to be true.

 

I will eat at a restaurant if “they serve pancakes” OR “they serve waffles” OR “they serve omelets”.
 

In this expression all statements are linked by OR's so if any one of them is True, the action (me eating there) will be triggered.

 

The consistent use of AND’s require all of the statements to be True to trigger the action (me eating there) and the consistent use of OR’s requires any one of them to be True.  No clarification is needed for such rules.

 

 

Page url: https://decision.cudl.com/help/index.html?booleanexamples.htm