12-31-2022, 02:18 AM
What are you trying to do with that code? Why does one line in the code have no line number?
Maybe the thread title should be "Convert GOTO to GOSUB so my program dies". (shrugs)
If "GOSUB" is used that way, why not at least keep track of the number of times it was called, and add a condition so it jumps out of the loop and then calls "RETURN" an equal amount of times? One operation or the other should have a purpose.
There's no opportunity even to use "FakeReturn" stunt that Purebasic has, which must be used if "RETURN" is followed by a line label. Which is supposed to prevent either the stack overflow of 16-bit legacy or the chewing up of RAM that is becoming too common in 64-bit systems. I'm not in the mood to request it for QB64PE.
Maybe the thread title should be "Convert GOTO to GOSUB so my program dies". (shrugs)
If "GOSUB" is used that way, why not at least keep track of the number of times it was called, and add a condition so it jumps out of the loop and then calls "RETURN" an equal amount of times? One operation or the other should have a purpose.
There's no opportunity even to use "FakeReturn" stunt that Purebasic has, which must be used if "RETURN" is followed by a line label. Which is supposed to prevent either the stack overflow of 16-bit legacy or the chewing up of RAM that is becoming too common in 64-bit systems. I'm not in the mood to request it for QB64PE.