Chapter 3: Confusing && and || Conditions

Confusing && and || Conditions
It is a surprisingly common error to confuse “and” and “or” conditions. A value lies between 0 and 100 if it is at least 0 and at most 100. It lies outside that range if it is less than 0 or greater than 100. There is no golden rule; you just have to think carefully.
Often the “and” or “or” is clearly stated, and then it isn’t too hard to implement it. Sometimes, though, the wording isn’t as explicit. It is quite common that the individual conditions are nicely set apart in a bulleted list, but with little indication of how they should be combined. The instructions for the 1992 tax return say that you can claim single filing status if any one of the following is true:
• You were never married.
• You were legally separated or divorced on December 31, 1992.
• You were widowed before January 1, 1992, and did not remarry in 1992.
Because the test passes if any one of the conditions is true, you must combine the conditions with or. Elsewhere, the same instructions state that you may use the more advantageous status of married filing jointly if all five of the following conditions are true:
• Your spouse died in 1990 or 1991 and you did not remarry in 1992.
• You have a child whom you can claim as dependent.
• That child lived in your home for all of 1992.
• You paid over half the cost of keeping up your home for this child.
• You filed (or could have filed) a joint return with your spouse the year he or she died.
Because all of the conditions must be true for the test to pass, you must combine them with an and.