Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
You'd think this would be faster, but NO!!!!!! [Resolved]
#23
(10-14-2022, 09:49 PM)Pete Wrote: Eeeeeeeks! It looks like I sent you guys on a snipe hunt this time around. My apologizes for wasting your time.

That's it, double use of a looping variable. I'm usually on the lookout for this kind of error. In the code, there are a lot of uses of the local variables h, i, j, and k. So much so, I had to make some exceptions to avoid the problem, you just found, by going to names like k2 or ii.

Well this puts a platter of eggs on my face, but I'm actually glad it isn't some internal compiler problem. Thanks for figuring it out. The important thing is... you beat Steve!

Pete

Edited thread title to reflect "Resolved."

Snipes is good eatin'! You're not alone Pete. I can't count the number times I've posted code on .ORG and .NET stating something was fishy only to have someone else find the flaw in my code when I'm sure my code was correct.

I always told my students that if you can't find any flaws in your code, even after staring at it for hours, but something unexpected is still going on, hand the code to someone else and 9 times out of 10 they'll find the culprit within 5 minutes. Fresh eyes vs tired brain syndrome.
Reply


Messages In This Thread
RE: You'd think this would be faster, but NO!!!!!! - by TerryRitchie - 10-15-2022, 03:38 AM



Users browsing this thread: 9 Guest(s)