# Operators

Macro expressions can contain several different operators. They can be used for assignments, comparisons, arithmetic or logical operations and string concatenations. Following is a list of all the operators. Operators can be operating on one (unary), two (binary) or three (ternary) sub expressions:

## Arithmetic Operators

OperatorNameType
-Subtractionbinary
*Multiplicationbinary
/Divisionbinary
%Modulobinary
-Unary Minusunary
+Unary Plusunary

## Assignment Operators

OperatorNameType
=Assignmentbinary
-=Subtraction Assignmentbinary
*=Multiplication Assignmentbinary
/=Division Assignmentbinary
%=Modulo Assignmentbinary
&&=Logical And Assignmentbinary
||=Logical Or Assignmentbinary
&=Concatenation Assignmentbinary

## Comparison Operators

OperatorNameType
==Equalsbinary
!=Not Equalsbinary
<Less Thanbinary
<=Less Than or Equalsbinary
>Greater Thanbinary
>=Greater Than or Equalsbinary

## Logical Operators

OperatorNameType
&&Logical Andbinary
||Logical Orbinary
!Logical Notunary

## String Concatenation Operator

OperatorNameType
&Concatenationbinary

## Ternary Operator

OperatorNameType
?:Ternary Operatorternary

## Operator Precedence

In macro expressions, order of evaluation for operators is always left to right. There is no precedence of any operator to another. For instance the expression 2 + 3 * 4 evaluates to 20 (first 2 + 3 = 5, then 5 * 4 = 20). The order of operations can be changed by providing parantheses: 2 + (3 * 4) will evaluate to 24. The Expression Editor automatically fully paranthesizes any expression so that this is obvious. If you type 2 + 3 * 4 / 5 to Expression Editor it will automatically parse and convert it to ((2 + 3) * 4) / 5.