Chapter 6. YCP Operators

Table of Contents

6.1. Comparison Operators
6.2. Boolean Operators
6.3. Bit Operators
6.4. Math Operators
6.5. Triple Operator
6.6. Operators Precedence
6.7. The bracket operator

As any other programming language YCP knows a lot of operators that can be used to act on data.

6.1. Comparison Operators

These are binary operators for comparison of two values. The result is always boolean.

OperatorDatatypeDescription
==almost allTrue if operands are equal, otherwise false.
<almost allTrue if left operand is smaller than the right one, otherwise false.
>almost allTrue if left operand is greater than the right one, otherwise false.
<=almost allTrue if left operand is smaller or equal to the right one, otherwise false.
>=almost allTrue if left operand is greater or equal to the right one, otherwise false.
!=almost allTrue if operands are not equal, otherwise false.