How does the "short circuit evaluation of conditions" work? #1241
-
Hey, just for my understanding: What are the criteria to shortcut the evaluation? Is it based on: at first node == false -> break & return Thank you in advance and have a nice day :) |
Beta Was this translation helpful? Give feedback.
Answered by
WarmUpTill
Oct 15, 2024
Replies: 1 comment 3 replies
-
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Tpal12
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
There is no custom short circuit logic implementation done on my side, as I am simply relying on C++ doing the short circuit evaluation for me here.
If the current "condition evaluation result" of a macro cannot change with a given logical operator and the given input parameters the evaluation of a condition is skipped.
Let's assume you have the following conditions in a macro ...
... and the state of the conditions is:
The conditions will be evaluated from top to bottom resulting in this expression having to evaluate to
true
for the macro to be executed:((File || Scene) && Timer)
As the
File
check returnstrue
, theScene
check will be ski…