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

GOTOs inside FOR and WHILE loops break execution flow #1

Open
kara1001000 opened this issue Aug 14, 2018 · 1 comment
Open

GOTOs inside FOR and WHILE loops break execution flow #1

kara1001000 opened this issue Aug 14, 2018 · 1 comment

Comments

@kara1001000
Copy link

Thanks for this interesting project! I tried to modify it for MBASIC, a Basic dialect from the CP/M times, and had some success after adding support for a few things such as "ON .. GOTO/GOSUB" and "DATA" & "READ" statements. However, I also found a major issue: whenever there is a GOTO inside a loop (before NEXT), execution flow breaks on JS as we'll have a return statement inside the loop. I couldn't figure out any easy way to solve this (especially as labeled continue and break only work backwards in JS). Perhaps you have some ideas how to fix this?

@danielflower
Copy link
Owner

Hi there, I'm afraid I probably can't provide any help. From memory, fixing that would need a fundamental change to the way it works. It was over ten years ago that I wrote it though so I could be wrong.

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

No branches or pull requests

2 participants