Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
is possible a variable goto or gosub?
(09-28-2021, 09:56 PM)maeloterkim Wrote:
(09-28-2021, 07:41 PM)boriel Wrote:
(09-27-2021, 01:50 PM)maeloterkim Wrote: Hi

in the original  ZX spectrum basic you can do this

goto MyVariable  or gosub MyVariable  where this variable must be a line number

maybe you can implement this with the compiler


this way the behaviour is more like the original ZX spectrum Smile

You don't need all of this. Use ON ... GOTO /  ON GOSUB instead.

on myVariable gosub MyRoutine1, MyRoutine2, MyRoutine3

goto myLoop

print "MyRoutine1"

print "MyRoutine2"

print "MyRoutine3"

Try this, and let me know if it works. Shy

Yes it works 

But i didnt found this   ON .. GOTO OR GOSUB in the documentation ( )

maybe there is something or a lot more that we dont know Smile

Unfortunately (I checked yesterday) GOTO / GOSUB and IN documentation is lost (I moved the wiki long ago, some documents were not restored correctly). I'll put them back.

Thanks for reporting. If you find any other broken link, please let me know.

Messages In This Thread
RE: is possible a variable goto or gosub? - by boriel - 09-29-2021, 08:07 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)