Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Reusing variable names leads to programmer confusion about which variable is being modified. Additionally, if variable names are reused, generally one or both of the variable names are too generic.

Non-

...

Compliant Code Example

...

In the following this example, the programmer sets the value of the msg variable expecting to reuse that outside the block. Due to the reuse of the same variable name, however, the outside msg variable value is not changed.

...