What we have looked at so far is tinkering with values returned from variable expansions and descriptors used in a tricky way. So, something nice, but we could not do much more, since we do not have a way to actually relate values, compare or even modify at our will.
Here is where the operators come in to play, and we will see how to modify the value of a variable so that it will hold a value and, over time, modify to gather new information. So, let's start from something simple, from basic math then move on to something more complex.
One last thing we have to bear in mind before proceeding is that the operators follow an order of precedence:
- The compound logical operators -a, -o, and && have a low precedence
- The arithmetic operators have the following precedence:
-
- Multiply
- Divide
- Add
- Subtract
- The evaluation of operators with equal precedence is from...