Customizing Features for Your Practice > Using PracticeScript > Using PracticeScript Operators
For numeric data, there are four basic mathematical operations you can perform:
Mathematical Operators
Mathematical Operators |
Meaning |
Example |
- (minus sign) |
Subtraction |
3-1 |
/ (forward slash) |
Division |
3/3 |
* (asterisk) |
Multiplication |
3*3 |
+ (plus sign) |
Addition |
1+1 |
In mathematics, operators are given a precedence to determine how an expression is to be evaluated. Without rules of precedence, mathematical expressions could be ambiguous.
With an expression such as 3 + 4 * 5, the following calculations can be made:
If the addition is done first, you have 7 * 5, which is equal to 35.
If the multiplication is done first, you have 3 + 20, which is equal to 23.
The second option is the correct answer, because the rules of precedence in mathematics state that multiplication has a higher precedence than addition. Operators that have an equal precedence are evaluated from left to right.
PracticeScript follows the mathematical rules of precedence.
Using PracticeScript Operators