Arithmetic operators

Top  Previous  Next

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

 

Following arithmetic operators exist:

Binary operators:

 

Op1 * Op2

Op1  / Op2

Op1 % Op2  (modulus or remainder)

Op1 + Op2

Op1 - Op2

 

Unary operators:

Op++

Op1--       

 

Applied on types, which represents numbers, the operators  + (addition), - (subtraction), * (multiplication) and / (division) execute the according basic arithmetical operation.

(op1 % op2)  Remainder of (op1 divided by op2)

 

For / and %, op2 must be nonzero op2 = 0 results in an error. (You can't divide by zero.)

% cannot be applied on the double type.

 

The operator ++ (increment) adds the number 1 to the value of the expression.

The operator -- (decrement) subtracts the number 1 of the value of the expression.

 

Applied on strings the addition causes a concatenation of the characters.

 



This page belongs to the TextTransformer Documentation

Home  Content  German