Operators (Magic xpi 3.x)
You can use Operators within your expressions. The expression can include an Operator that describes the action to perform, and an Operand, which is the object on which the action should be performed, such as the variable you included.
Operators are divided into these three categories:
You can enter any arithmetic expression that follows conventional algebraic rules, or a string or a logical expression. Here are the Operators you can use:
|
|
|
Mathematical Operators
|
+
|
A+B+C
|
Mathematical operator for addition.
|
/
|
A/B
|
The result of integer division is rounded to the nearest whole number.
|
^
|
A^B returns A to the power of B.
|
Mathematical operator for exponentiation.
|
*
|
A*B
|
Mathematical operator for multiplication.
|
-
|
A-B-C
|
Mathematical operator for subtraction.
|
String Operators
|
&
|
'John'&'Smith' yields 'JohnSmith'
|
Use the & symbol to concatenate (string together) Alpha strings.
|
Logical Operators
* All expressions involving logical operators return a logical TRUE or FALSE.
|
AND
|
|
Returns TRUE only if both operands are TRUE.
|
OR
|
|
Returns TRUE only if either operand is TRUE.
|
<>
|
A<>B
|
Different than (not equal to).
|
=
|
A=B
|
Equal to.
|
>
|
A>B
|
Greater than.
|
>=
|
A>=B
|
Greater than or equal to.
|
<
|
A<B
|
Less than.
|
<=
|
A<=B
|
Less than or equal to.
|