First Case
I met "unexpected" behaviour when I use the "Everything not equals something" operator as follows:
In the above situation, I think the condition "should" evaluate to False since one of the signals is indeed the Red Signal. However, the decider combinator checks the condition being True and output the specified signal.
Second Case
when I use the "Anything equals something" operator as follows:
In the above situation, why wouldn't the condition be evaluated to True as one signal is Red?
I must be thinking it wrong somewhere. Really appreciate if someone could point out what I misunderstand and explain the inner workings for me? I have searched on the Wiki and the forum, but nothing similar comes up. I also have some programming experience. In my current understanding, "Everything" means AND every single condition while "Anything" means OR every condition. Is that mindset wrong?
[Circuit Network] Why is Everything and Anything not working as expected?
Re: [Circuit Network] Why is Everything and Anything not working as expected?
If you compare a virtual signal logic signal against a specific signal it is understood that that signal exists only on the right side, otherwise the solution is always trivial and therefore useless as a tool.
Re: [Circuit Network] Why is Everything and Anything not working as expected?
Hi, thanks for replying.
Could you clarify what this means: "it is understood that that signal exists only on the right side" more specifically? Does that mean I can't compare with a specific signal? I tried comparing with constant (like numbers) and everything works as expected. So, I can't use a specific signal as the right-hand side in the decider combinator?
Could you clarify what this means: "it is understood that that signal exists only on the right side" more specifically? Does that mean I can't compare with a specific signal? I tried comparing with constant (like numbers) and everything works as expected. So, I can't use a specific signal as the right-hand side in the decider combinator?
Re: [Circuit Network] Why is Everything and Anything not working as expected?
If you have Everything or Anything on the left and Red on the right, then the Everything/Anything represents all the signals except of that on the right. That means if you have { Red = 1, Blue = 1, Yellow = 2 } and you have a condition Anything==Red it will be true because there is the Blue signal with the same value as Red. It does not check Red==Red because that would be always true and as such useless.
Re: [Circuit Network] Why is Everything and Anything not working as expected?
In other words:
"Everything" != "Red" is actually processed as "Everything except "Red"" != "Red"
so that the red signal is not compared to itself. If this exception would not exist, all comparison with a logic signal on the left and a normal signal (instead of an integer) on the right side had a trivial result.
"Everything" != "Red" is actually processed as "Everything except "Red"" != "Red"
so that the red signal is not compared to itself. If this exception would not exist, all comparison with a logic signal on the left and a normal signal (instead of an integer) on the right side had a trivial result.
Re: [Circuit Network] Why is Everything and Anything not working as expected?
Oh! Now I understand why.
So, thinking the signal as {key: value} pair, the operation is to compare against the "value" rather than the "key". That's what I misunderstand. Then, on top of that, the signal on the right hand side is not counted into the result.
Again, thank you very much!! That completely solved my confusion.
So, thinking the signal as {key: value} pair, the operation is to compare against the "value" rather than the "key". That's what I misunderstand. Then, on top of that, the signal on the right hand side is not counted into the result.
Again, thank you very much!! That completely solved my confusion.
-
- Burner Inserter
- Posts: 7
- Joined: Mon Mar 21, 2016 4:24 pm
- Contact:
Re: [Circuit Network] Why is Everything and Anything not working as expected?
Unless you have the output wired back to the input as is done in some usestezktenr wrote: Fri Apr 30, 2021 3:15 pm ...the signal on the right hand side is not counted into the result.
