Because DX, DY, etc are initialized outside the DEF, the variables with these same names inside the DEF are assumed to refer to the global ones, not local variables that happen to have the same names.