If the state of the world, for example the value of a variable, is modified in a calculation, it's a side effect.
For example, j = 3
calculates 3, but it also modifies the value of j
as a side effect.
A less trivial example: j += 3
calculates j + 3
, but it also sets j
to this new value.
The semantics of C muddle the waters: in C the main point of writing i = 1
is to get the side effect of the variable assignment; not calculating the value 1
. The talk about assignments as side effects makes more sense with functional programming languages such as Haskell or Erlang, where variables can only be assigned once.