Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why does my Loop end after 11 Loops?
#64
Boring???? That's fascinating bplus. Terry gave me a real good example of how he stacked recursive calls. Your If..EndIf is nested similar to the For..Next nesting, and I'm coming to the realization that your example may be the closest to nesting recursion calls. The structure I had in mind was:

Sub Recur

   Recur
     Recur
        Recur
          Do Stuff
        End Sub
     End Sub
  End Sub

End Sub

As Terry has demonstrated you can do

Sub Recur
  Recur
  Recur
  Recur
End Sub

In your example, I would nest the routine and not the Recur call. The Recur call however would need parameters. A recurring nested routine would take a lot longer to process (Time to Process =  does the sun still shine). One of my attempts at nesting a recursive call was similar to your code however I used Select Case but it actually turned out to be more like stacking as Terry's example. I'm going to abandon Nesting Recursion. Stacking obviously is the way to go (if it turns out to be as accurate and faster than what I'm using right now). Also, I'm abandoning it because I'm depressed my team did not win the Super Bowl.
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-13-2023, 05:52 PM



Users browsing this thread: 10 Guest(s)