Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Coverting GOSUB to GOTO?
#8
(12-30-2022, 07:44 PM)James D Jarvis Wrote:
(12-30-2022, 07:23 PM)bplus Wrote: Can you have a proper GOSUB without a proper RETURN?

I say no.

That's why I was wondering if the compiler spots it and turns it into a Goto. I had a C/C++ compiler that would do such years ago but I have no idea how to check if QB64 is doing that.

You do start getting complaints when you do try and add a RETURN. It does behave just like a GOTO otherwise so I think the stack stuff must involve a RETURN in the code.

Oh yeah you can probably catch the C++ interpretation in a temp file
b = b + ...
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



Users browsing this thread: 4 Guest(s)