Assignment operators

Top  Previous  Next

Scripts > Class elements and c++ instructions > Interpreted C++ instructions > Operators > Assignment operators


Following assignment operators exist:


=    *=     /=    +=    -=   %=   ^=   |=   &=   <<=   >>=


The value of the operand Op1 after execution of the assignment


Op1 = Op2;


is equal to the value of Op2.


The expression


Op1 op= Op2;


has the same effect as


Op1 = Op1 op Op2;


Example: Op1 += Op2; is equivalent to Op1 = Op1 + Op2;.


The operands Op1 and Op2 must be either of the same type or they must be compatible to each other.


For Op2 also the call of a production or a token can be substituted, if they return a compatible value, and if the closing bracket of the semantic action is immediately following the operator:




{{e = }} Term

{{e += }} Term    

{{e -= }} Term



This page belongs to the TextTransformer Documentation

Home  Content  German