So with the goal of distinguish between a starting point of a GOSUB and a call of a GOSUB it must be the use of the END to point out the end of the main program. waiting feedbacks
Title: Re: GOSUB RETURN a bug of parser?
Post by: Unseen Machine on August 22, 2020, 09:22:46 am
Well, the code runs line after line, as they are GOSUB's and not actual SUB's/FUNCTION's they get run after your main code block. Hence the return command has no idea of where it should return to, so yes you'll need to use END or SYSTEM afterwards or simply add a SkipGosubs line
Title: Re: GOSUB RETURN a bug of parser?
Post by: FellippeHeitor on August 22, 2020, 09:57:30 am
Yeah, not a bug in the parser. A bug in your code ;-)
Use END or SYSTEM.
Title: Re: GOSUB RETURN a bug of parser?
Post by: TempodiBasic on August 23, 2020, 03:10:05 am
Thanks So my deprecated lazyness to type is the real bug of this code! :-)
I thank you also for the alternative to END to solve the issue so your main message to me is control the flow of your program! and you can do this control using canonical ways like END SYSTEM or alternative ways like the jump of GOSUB blocks. I have found the deprecated STOP keyword that in an interpreted BASIC was useful for debug but here in QB64 is a duplicated of END. It is not possible to write a modern code block (SUB/FUNCTION) before the Block of GOSUB!