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

Binary operators "and", "not", "or" failing on integers #561

Open
niveditasonker opened this issue Oct 13, 2020 · 1 comment
Open

Binary operators "and", "not", "or" failing on integers #561

niveditasonker opened this issue Oct 13, 2020 · 1 comment
Labels
bug Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior stdlib Affects the standard library included with this BrightScript implementation

Comments

@niveditasonker
Copy link
Contributor

Code for XOR fires error- Attempting to NOT non-boolean value

function xor(a as integer, b as integer) as integer
    if a = 0 then return b
    if b = 0 then return a
    return ((a and not b) or (not a and b))
end function
@alimnios72 alimnios72 added bug Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior stdlib Affects the standard library included with this BrightScript implementation labels Oct 14, 2020
@lvcabral
Copy link
Contributor

Duplicate of #457

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior stdlib Affects the standard library included with this BrightScript implementation
Projects
None yet
Development

No branches or pull requests

3 participants