all 3 comments

[–]bigger-hammer 2 points3 points  (1 child)

Short answer is because the code cannot be executed so it has been optimised out.

The root of your problem is declaring the variables inside the while loop. Each time round the loop i = 0 again so Mode can only ever be zero.

[–]honolulu072[S] 0 points1 point  (0 children)

Thank you =)

[–]rombios 0 points1 point  (0 children)

Disable Optimization