Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why does my Loop end after 11 Loops?
#20
(02-07-2023, 07:42 PM)Dimster Wrote: Well I solved the problem as any good programmer would do, I scrapped the road I was going down and combined the Recursion Loop with a Do Loop. Where the Seek was struggling it now flies. So basically the structure of the routine it along these lines

Open the file

Recur 

Sub Recur
 Seek #1,1
  Do While Not EOF(1)
  Input the 7 data items
  DataCount = DataCoount +1
  Call to the Subroutine to deal with the 7 data items
  If DataCount = 4000 then exit sub
  recur
end Sub

This is a simplified layout but you get what I mean by combining the Do Loop and Recursion Loop. I'm absolutely sure there is a more elegant way to have done this but as long as I got my 4000 loops I'm a happy camper. I very much appreciate all the wit and humor that comes with the sage advice. Thanks again.

@Dimster

You say that works?

How the heck did you get away with having a Do without a Loop?
Show me the code, I am sure there is something missing if it works.
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
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 bplus - 02-07-2023, 08:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Exiting sub while inside a loop PhilOfPerth 5 525 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 724 09-03-2025, 11:50 PM
Last Post: fistfullofnails
  What is wrong with this for/next loop Helium5793 6 1,152 04-15-2025, 05:11 PM
Last Post: Kernelpanic
  Question on ln in a for/next loop Dimster 13 2,251 09-13-2024, 11:07 PM
Last Post: Kernelpanic

Forum Jump:


Users browsing this thread: 1 Guest(s)