Below simple example:
float a = 4.2f;float calc(float a, float b){ Log("Received: " + a + ", " + b + "\n"); if (a == 4.2f) { int a = 6; } return a * b;}void main(){ Log("Result of calc function: " + calc(5, 5));}
When breakpoint is set at line with "Log" in calc function, I can see that local nested variable a (line: int a = 6) already exists, so we have 2 local variables named "a", before even nested "if" is executed (which btw. is never executed with this condition).
[Edited by - virious on November 30, 2010 7:25:08 AM]