This is because the RHS of the assignment does not refer to the LHS.
There is no inverse function to reverse the new value of back to
its previous value before the assignment statement.
As a result, you can use the substitution rule if and only if the
following conditions are all true for an assignment statement
(
is an expression):
For all other assignment statements, the forget rule should be used. This include the following statement:
This is because even though the RHS refers to the LHS in this case,
it is not reversible. Once variable becomes zero after this statement,
there is no way to ``recover'' its previous value before the assignment
statement.
Copyright © 2012-02-07 by Tak Auyeung