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

A suggested bug-fix for the "swap" statement #55

Closed
CharlieJV opened this issue Jan 6, 2022 · 1 comment
Closed

A suggested bug-fix for the "swap" statement #55

CharlieJV opened this issue Jan 6, 2022 · 1 comment

Comments

@CharlieJV
Copy link

As is, "swap a$, b$" will put the value of b$ in a$, then put a$ (which is now equal to b$) into b$ (i.e. leaving b$ as it was at the start.)

The fix to my version of the code (included in BASIC Anywhere Machine, new release pending) has this line:

curop += b + ' = t' + ';\n';

which replaces the following line in the version of wwwbasic.js currently on github:

curop += b + ' = ' + a + ';\n';

@flagxor
Copy link
Collaborator

flagxor commented Oct 29, 2022

Thanks for catching!
I've fixed here and added a test:
4b17610

@flagxor flagxor closed this as completed Oct 29, 2022
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