I got 2 programs that give me EXACTLY the same results for the input that I give them. They are actually the EXACT same programs, except for this one line 'integer dim' in the second program (line 103). This is not there in the first program (should be line 141 if it was there).
http://pastebin.com/wh7NUt3Z & http://pastebin.com/S1hAB6TW
Now, the problem is that this declaration of the integer dim gives me a slower time in the second program than in the first program (found by this timer). I declared the integer again in the first program and I found that it gave me the same time as the second program, so I know that this is the reason why the second program is slower.
Now I want to know WHY I have to declare this integer again in the second program, but not in the first one... And if possible, I want to remove this (because it will reduce the time calculating).
Anyone that can help?