Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Coverting GOSUB to GOTO?
#12
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.
Reply


Messages In This Thread
Coverting GOSUB to GOTO? - by James D Jarvis - 12-30-2022, 06:38 PM
RE: Coverting GOSUB to GOTO? - by SpriggsySpriggs - 12-30-2022, 07:20 PM
RE: Coverting GOSUB to GOTO? - by James D Jarvis - 12-30-2022, 07:47 PM
RE: Coverting GOSUB to GOTO? - by bplus - 12-30-2022, 07:23 PM
RE: Coverting GOSUB to GOTO? - by James D Jarvis - 12-30-2022, 07:44 PM
RE: Coverting GOSUB to GOTO? - by bplus - 12-30-2022, 08:33 PM
RE: Coverting GOSUB to GOTO? - by bplus - 12-30-2022, 07:56 PM
RE: Coverting GOSUB to GOTO? - by SpriggsySpriggs - 12-30-2022, 08:14 PM
RE: Coverting GOSUB to GOTO? - by SMcNeill - 12-30-2022, 11:29 PM
RE: Coverting GOSUB to GOTO? - by SMcNeill - 12-30-2022, 11:41 PM
RE: Coverting GOSUB to GOTO? - by bplus - 12-31-2022, 06:26 PM
RE: Coverting GOSUB to GOTO? - by SMcNeill - 12-31-2022, 07:19 PM
RE: Coverting GOSUB to GOTO? - by James D Jarvis - 12-31-2022, 12:41 AM
RE: Coverting GOSUB to GOTO? - by mnrvovrfc - 12-31-2022, 02:18 AM
RE: Coverting GOSUB to GOTO? - by James D Jarvis - 12-31-2022, 07:13 PM
RE: Coverting GOSUB to GOTO? - by euklides - 12-31-2022, 12:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Book for sanity/insanity break: "10 PRINT CHR$(205.5+RND(1)); : GOTO 10" CharlieJV 4 1,037 08-22-2023, 08:15 PM
Last Post: bplus
  SUBS or GOSUB; for library projects, which do you guys prefer? Pete 9 2,044 08-29-2022, 08:12 PM
Last Post: Kernelpanic

Forum Jump:


Users browsing this thread: 1 Guest(s)