2011-12-04, 12:07 PM
SaptaZapta Wrote:But it's not a global value. It's an argument to the function, passed by value, so the function can do whatever it pleases with it.
Yeah, but then, what does the variable year1 represent? What if someone later on came and had to edit the code, thinking that year1 is the first year? They would get pretty confused when year1 and year2 were equal (unless it's specifically mentioned in the code). It's just good code practise to avoid changing state unless you really have to.

