Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GOTO should fall-through when given an invalid line #4

Closed
skx opened this issue Jul 4, 2021 · 2 comments
Closed

GOTO should fall-through when given an invalid line #4

skx opened this issue Jul 4, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@skx
Copy link

skx commented Jul 4, 2021

Consider this program:

 10 PRINT "OK"
 20 GOTO 1

This reports an error ("cannot goto a nonexistant line"), but I think it should fall-through. Reporting an invalid line is probably the correct choice with:

 10 PRINT "BLAH"
 20 GOTO 3000
 2000 PRINT "BLAH"

I guess here the expectation is that GOTO should go to the named line, and if it isn't present the next one that is there. But be limited by the upper-bound of lines that was used.

@James-Livesey James-Livesey mentioned this issue Jul 4, 2021
@James-Livesey James-Livesey added the enhancement New feature or request label Jul 4, 2021
@James-Livesey
Copy link
Member

Thanks for the issue! Haven't really thought about this mechanic to BASIC myself. Seems to be a great improvement, so I've created a pull request and I'm about to merge it!

@James-Livesey
Copy link
Member

All merged; just give GitHub Pages a few minutes to get its act together, and then once you've hard reloaded, it should all be working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants