View Single Post
Old Nov 15th, 2006, 6:26 PM   #12
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 850
Rep Power: 4 The Dark is on a distinguished road
That is because your function now always returns i and uses i as the parameter for the call to correct(). As far as I can tell, i has nothing to do with the number of probes you have entered and has nothing to do with anything. In fact it is now always 1 as the loop always hits a break statement in the first iteration.

You should add a counter variable to your function and increment the counter every time the user enters a probe. Then just use the counter in the call to correct() and in the return.
The Dark is offline   Reply With Quote