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

Incrementing symbol does not work #37

Open
sasq64 opened this issue May 6, 2023 · 4 comments
Open

Incrementing symbol does not work #37

sasq64 opened this issue May 6, 2023 · 4 comments
Labels
bug Something isn't working Questionable

Comments

@sasq64
Copy link
Owner

sasq64 commented May 6, 2023

x = 1
x = x + 1

Fails after max passes. Should work.

@sasq64 sasq64 added the bug Something isn't working label May 6, 2023
@sasq64
Copy link
Owner Author

sasq64 commented Jun 10, 2023

On second thought -- it probably should not be supported...

@antis81
Copy link
Contributor

antis81 commented Jun 12, 2023

FYI: Trying to access a label that is later defined and then trying to redefine results in fail after max passes.

    jsr plot
    rts

plot:
    nop
    rts

plot:   ; -> fails; expected "error: already defined label 'plot'"
    rts

Note: Addressing this in PR #39

antis81 added a commit to antis81/bass that referenced this issue Jun 19, 2023
@antis81
Copy link
Contributor

antis81 commented Jun 19, 2023

In the PR I have added both tests. Now it becomes pretty clear that the undefined.insert() line in SymbolTyble::set() is the actual issue. Maybe we can make use of std::any::has_value()…?

@antis81
Copy link
Contributor

antis81 commented Jul 27, 2023

Following ACME as a de-facto standard changing the description slightly will make this goal achievable:

X = 1
!set X = X +1

(obviously ACME also defines symbols constant by default)

Now the bug turns into a feature (request)… 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Questionable
Projects
None yet
Development

No branches or pull requests

2 participants