Since Z isn't listed in the definition for FUNC, it isn't masked off in any way. Therefore, when we use its value in line 7 and change it in line 9, we use it as a regular global variable, and it IS altered to 22 after the call to FUNC. This is all rather confusing, but hopefully it makes at least some sense and shows you how careful you have to be about the variables you use in your functions.