Mathematical operations are defined for both integral and floating point types.
If both values are of integral type result will be integral with the exception of the \ divide which will produce floating point value. To get integral result use Integer Divide \
Result is sum of two expressions
Syntax:
left_expression + right_expression
Result is subtraction of two expressions.
Syntax:
left_expression - right_expression
Result is multiplication of two expression.
Syntax:
left_expression * right_expression
Result is division of two expressions.
Syntax:
left_expression / right_expression
Result is integer division of two expressions.
Integer operations are not checked for overflow.
Syntax:
left_expression \ right_expression
Floating operation require Runtime with built-in Math support. If code is compiled with the Runtime without Math support Linker will report errors while trying to locate runtime floating point support functions.
Result is sum of two expressions.
Syntax:
left_expression + right_expression
Result is subtraction of two expressions.
Syntax:
left_expression - right_expression
Result is multiplication of two expression.
Syntax:
left_expression * right_expression
Result is division of two expressions.
Syntax:
left_expression / right_expression
Division by 0.0 will result in runtime error &hEE2001 "Division by zero"
Combined assignment operators
Combined assignment and mathematical, string or shift operators are a short form of the following general assignment expression:
symbol = symbol operator expression
which can be expressed in the short form:
symbol operator = expression
In each case the short form is equivalent to the general form of the assignment and follows the same rules.
Syntax:
symbol += expression
Syntax:
symbol -= expression
Syntax:
symbol *= expression
Syntax:
symbol /= expression
Integer Divide and assign \=
Syntax:
symbol \= expression
Concatenate and assign &= or +=
Syntax:
symbol &= expression
symbol += expression
Shift right and assign >>=
Syntax:
symbol >>= expression
Shift left and assign <<=
Syntax:
symbol <<= expression