| Reference > Rule Languages > Business Action Language > BAL Constructs > all of the following conditions are true |
all of the following conditions are true |
PREVIOUS NEXT |
Groups together a series of conditions such that the combined statement evaluates to true only if all the listed conditions evaluates to true.
all of the following conditions are true:
- <condition>* [,]
The all of the following conditions are true provides a more compact and convenient alternative to the logical operator and when you want to combine multiple conditions. The resulting statement is considered true only if each of the listed conditions is true.
This is equivalent to writing if <condition 1> and <condition 2> and ... <condition n>. However, if you have a large number of conditions, using the all of the following conditions are true construct can make the rule more readable.
The construct must be followed by a colon and one or more condition statements, each one on a separate line and preceded by a dash. Note that the dash that precedes each condition must be a `short dash'.
Optionally, you can add a comma after the last condition statement in the list to signify the end of the list of grouped conditions. This will separate those conditions that form part of the construct from any additional condition statements that might follow.
The following group of conditions tests that a customer is Gold junior member.
if
all the following conditions are true:
- the category of the customer is Gold
- the age of the customer is at most 15
then...
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |