Skip to main content
Version: 6.x

Comparison operators (=, >, <, ...)

Comparison operators create actions which return the result of the comparison operation. The values of the created properties belong to the built-in class BOOLEAN.

The platform currently supports the following comparison operators:

OperatorNameDescriptionExampleResult
= or ==EqualityTakes two operands and returns TRUE if the operands are equal5 = 5 or 5 == 5TRUE
!=InequalityAccepts two operands and returns TRUE if the operands are not equal3 != 5TRUE
>, <Strict comparisonAccepts two operands and returns TRUE if the strict comparison condition is met3 > 5NULL
>=, <=Non-strict comparisonAccepts two operands and returns TRUE if the non-strict comparison condition is met4 <= 5TRUE
LIKEComparison with a patternAccepts two operands: a string and a pattern. Returns TRUE if the string matches the pattern'abc' LIKE 'a%'TRUE

If one of the operands is NULL, all operators will return NULL as a result.

Language

Description of common comparison operators.
To create a property that compares a string with a pattern, the LIKE operator is used.

Examples

equalBarcodes = barcode(a) == barcode(b);
outOfIntervalValue1(value, left, right) = value < left OR value > right;
outOfIntervalValue2(value, left, right) = NOT (value >= left AND value <= right);
isPhoneNumber(value) = value LIKE '(___) ___-____';