Operators

Complete reference for all operators in Quartz.

Arithmetic Operators

Operator Description Example Result
+Addition5 + 38
-Subtraction5 - 32
*Multiplication5 * 315
/Division15 / 35
%Modulo7 % 31

Comparison Operators

Operator Description Example
==Equal toa == b
!=Not equal toa != b
<Less thana < b
>Greater thana > b
<=Less than or equala <= b
>=Greater than or equala >= b

Logical Operators

Operator Description Example
&&Logical ANDa && b
||Logical ORa || b
!Logical NOT!a

Assignment Operators

Operator Description Example
=Assignmentx = 5
+=Add and assignx += 5
-=Subtract and assignx -= 5
*=Multiply and assignx *= 5
/=Divide and assignx /= 5

Operator Precedence

From highest to lowest:

  1. ! (unary NOT)
  2. * / %
  3. + -
  4. &lt; &gt; &lt;= &gt;=
  5. == !=
  6. &amp;&amp;
  7. ||
  8. = += -= *= /=