Eq Boolean Function vs “ = “ in Expressions


#1

1) Give a description of the problem
I’m trying to figure out what I’m missing… or if something changed. Is it ever possible to reliably use the “ = “ operator in an expression (specifically within the condition of an IF statement), or do you always need to use the EQ Boolean function? Thanks!

2) What is the expected behavior?
if(1=2,”That’s unexpected!”,”Seems to be working”) … Should resolve to “Seems to be working!” …since “1=2” is false.

3) What is happening/not happening?
if(1=2,”That’s unexpected!”,”Seems to be working”) … is resolving to “That’s unexpected!”

4) Post a Green Snapshot of the pistonimage


5) Attach any logs (From ST IDE and by turning logging level to Full)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

Should be if x==y for if x is equal to y
And if x!=y for if x is not equal to

I believe


#3

Thank you @Gopack2!! Perfect! I’m sure that must be documented somewhere. I’ll be darned if I could find it.


#4

The expressions page on the wiki could probably use some reorganization… To find the equality operator you have to wade through a whole section on bitwise operators (which should be exceptionally uncommon to use in webCoRE), NAND, XNOR…


#5

MY BRAIN MELTS READING THIS STUFF. :exploding_head: