Comparison and Pattern Matching Operators in Rule Assembly Language
Comparison operators expect numeric operands. This means when you specify an item or arithmetic expression, the Siebel Product Configurator engine uses the quantity of the item or the value of the expression. These operators produce a logical result. This means the operator evaluates and compares the quantities of the operands and returns a true or false result.
The greater-than operator (>) is an example. The Siebel Product Configurator engine interprets the following top-level constraint to mean the quantity of item A must be larger than the quantity of item B in the solution. The Siebel Product Configurator engine enforces this constraint by adjusting the quantity of A or B as needed to make sure that the constraint is always true.
>([A],[B])
When used as sub-expressions, comparison operators return true or false. For example, if the quantity of item A in the solution is not greater than the quantity of item B, the previous example returns false. This is then acted on by the associated top-level expression.
Pattern matching operators compare two strings. You can test whether the strings are a match or a mismatch. Pattern matching operators return true or false.
Comparison operators are shown in the following table.
Operator | Syntax | Properties |
---|---|---|
Greater than |
|
A and B can be items or sub-expressions. |
Not less than |
|
A and B can be items or sub-expressions. |
Equals |
|
A and B can be items or sub-expressions. |
Not equal to |
|
A and B can be items or sub-expressions. |
Not greater than |
|
A and B can be items or sub-expressions. |
Less than |
|
A and B can be items or sub-expressions. |
Selected |
|
Returns true if A is positive, false if A is not. Same as >(A, 0). If used as top-level expression, means that A must be in the solution in any quantity. A can be an item or sub-expression. |