[C8-Pro 2.4.4.156] Why can't I compare TWO Boolean Variables Directly in RM?

I have two boolean variables and I need to see if they are the same.

While all the other variable comparisons I've used have the ability to choose a "Variable" as the target of the comparison, Boolean variables can ONLY be compared to a static "True" or "False".

@bobbyD @gopher.ny Why? Any chance of correcting that?

Thanks!

A few more clicks than the proposed approach, but if you haven't figured this out already, you can use some Boolean algebra to do this. One way is negating a XOR (i.e., a homemade XNOR):

IF (NOT (A = true XOR B  =true))

That's a bit fancy-looking, but another logically equivalent approach would be just spelling out what you want, i.e., IF ((A = true AND B = true) OR (A = false and B = false)).

Why there isn't a direct option for comparison how you're looking to do it I don't know, but having seen quite a few RM requests be made over the years, it's sometimes because no one thought of it but quite often that there's already a way and the threshold for additions is quite high with RM offering quite a lot already. :slight_smile:

2 Likes

Yeah, I just did the compound ANDs and ORs.

I guess it's not the end of the world--but those have to be a lot more intensive to execute than a simple comparison (relatively speaking).

I like the slightly more simple XOR approach--I hadn't thought of that. :slight_smile:

Thanks!