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.
b = b + ...
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



Users browsing this thread: 16 Guest(s)