| Reference > Rule Languages > Business Action Language > BAL Constructs > it is not true that <a condition> |
it is not true that <a condition> |
PREVIOUS NEXT |
Negates a condition statement.
it is not true that <condition>
When there is no sentence in the vocabulary or no operator to express the opposite of a condition, you can insert the it is not true that construct in front of an existing condition to negate it.
This can be useful in cases where a boolean (true/false) attribute defined in your vocabulary is verbalized as an expression such as 'customer is a loyalty member', but where you want to test for the opposite of this expression ('customer is not a loyalty member'). If the opposite expression has not been defined in your vocabulary, you could write 'it is not true that customer is a loyalty member' to achieve the desired result.
In general, the logic of a negative expression is more difficult to interpret, so it is advisable to avoid them where possible.
The following example uses the it is not true that construct to check the age of the customer, assuming that the boolean property `is a minor' has been verbalized in the vocabulary, but that the opposite of the expression `is a major' has not been defined.
if it is not true that the Customer is a minor
The following example shows how to negate a set of conditions that have been grouped using the all of the following conditions are true construct. The resulting expression will return True except if the customer is both a gold member and over 60.
if it is not true that all of the following conditions are true: - the category of the Customer is gold - the age of the customer is more than 60
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |