Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why does my Loop end after 11 Loops?
#41
So ... Holey Smoke ... some very informative stuff here. I'm going to print this off and keep it in my Basic Learning How To book.

On the issue of Recursion and a Counter, Tempodi remarks


Quote:DataCount = DataCount + 7 ' this is another alone variable that does not pass to the next recursive calling

If DataCount < 14 Then Recur ' this condition it will never happen because DataCount at each run is always 0 and becomes 7


But Steve's code, in his Recur subroutine, appears to have a successful counter working. Is there a reset back to zero for all Recursive calls as a normal use of Recursion or this reset to zero happening just in Tempodi's structure of his Recursion subroutine? I seem be getting my counters resetting only when I exit my Recursive routine but working ok within the Recursive calls but, while messing with a redesign of my Recursion call routine, I was able to jump from 11 loops to the 4000 loops, I then did a little more tinkering and now have endless looping going on. I never thought to look at an issue with the counter.
Reply


Messages In This Thread
Why does my Loop end after 11 Loops? - by Dimster - 02-06-2023, 07:08 PM
RE: Why does my Loop end after 11 Loops? - by Dimster - 02-08-2023, 03:39 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Exiting sub while inside a loop PhilOfPerth 5 523 12-05-2025, 09:40 AM
Last Post: PhilOfPerth
  Do Loop, Sleep and Mouse Button Dimster 5 599 09-06-2025, 12:57 PM
Last Post: Dimster
  Using modulo to loop through lists fistfullofnails 3 723 09-03-2025, 11:50 PM
Last Post: fistfullofnails
  What is wrong with this for/next loop Helium5793 6 1,142 04-15-2025, 05:11 PM
Last Post: Kernelpanic
  Question on ln in a for/next loop Dimster 13 2,241 09-13-2024, 11:07 PM
Last Post: Kernelpanic

Forum Jump:


Users browsing this thread: 1 Guest(s)