...
EXP05-EX0: The increment and decrement operators (++)
and (--)
read a numeric variable, and then assign a new value to the variable. These are While these operators read and modify a value, they are well-understood and are an exception to this rule. (Note that this rule can still be violated if a value is modified via ++
or --
and subsequently read or written.)
EXP05-EX1: The logical operators ||
and &&
have well-understood short-circuit semantics, so expressions involving these operators do not violate this rule. Consider the following code:
...