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

EQV, IMP, XOR #55

Open
blackborn66 opened this issue May 22, 2023 · 2 comments
Open

EQV, IMP, XOR #55

blackborn66 opened this issue May 22, 2023 · 2 comments

Comments

@blackborn66
Copy link
Contributor

blackborn66 commented May 22, 2023

these operators are all implemented (no compile or link error)
but all results are FALSE (no pun intended ;)
version 0.8.2 and 0.8.3 show the same

the behaviour seems to be different for constant expressions and expressions depending on variables

@gooofy
Copy link
Owner

gooofy commented May 25, 2023

actually, these operators are all covered in the test suite, e.g.

https://github.com/gooofy/aqb/blob/master/tests/opint.bas

at least to some extend - do you have an example for what is not working for you?

@blackborn66
Copy link
Contributor Author

As far as I can see, it isn't working for boolean constants.
Then the return is always FALSE (no pun intended ;)

DIM AS BOOLEAN b0, b1
b0 = TRUE
b1 = FALSE

TRACE "XOR"; " "; b0 XOR b0; " "; TRUE XOR TRUE
TRACE "XOR"; " "; b1 XOR b1; " "; FALSE XOR FALSE
TRACE "XOR"; " "; b0 XOR b1; " "; TRUE XOR FALSE
TRACE "XOR"; " "; b1 XOR b0; " "; FALSE XOR TRUE

TRACE "EQV"; " "; b0 EQV b0; " "; TRUE EQV TRUE
TRACE "EQV"; " "; b1 EQV b1; " "; FALSE EQV FALSE
TRACE "EQV"; " "; b0 EQV b1; " "; TRUE EQV FALSE
TRACE "EQV"; " "; b1 EQV b0; " "; FALSE EQV TRUE

TRACE "IMP"; " "; b0 IMP b0; " "; TRUE IMP TRUE
TRACE "IMP"; " "; b1 IMP b1; " "; FALSE IMP FALSE
TRACE "IMP"; " "; b0 IMP b1; " "; TRUE IMP FALSE
TRACE "IMP"; " "; b1 IMP b0; " "; FALSE IMP TRUE

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