in all of the examples I've seen how this works
condition?value = true:value = false
I have yet to find how it actually works. taking this mode of operation it is almost plainly explained.
Short-circuit evaluation As logical expressions are evaluated left to right, they are tested for possible "short-circuit" evaluation using the following rules: false && anything is short-circuit evaluated to false. true || anything is short-circuit evaluated to true.
What actually is meant by the term Short-circuit ?
and does the ?: come to the same conclusion on the left side of the ? just like the && and || does so that the right side of the ? short-circuits (fails) so then it goes to the right of the : then it does not fail. instead it completes an action.
The term short-circuit confuses me because I do not have a clear understanding it the term.
all I do know is this.
that this works on a return value of zero or true or yes
if true && then do this
if the return value on the left side is a non-zero it will fail
if false || then do this
if the return value on the left side is zero it will fail
in that understanding I then pose the question again.
Does the Conditional (ternary) Operator get evaluated in the same manner and operates in the same manner?
I have to brake it apart to demonstrate this question.
false ? anything is short-circuit evaluated to false. true : anything is short-circuit evaluated to true.
it looks like it is being explained as a
!true ? then fail true : then fail
true ? then no failure false : then no failure
it draws the conclusion on the very far left of the ?:
hypothesis ? conclusion true : conclusion false
in the same manner for the Logical operators
hypothesis && conclusion true operation preformed hypothesis || conclusion false operation preformed
do they both operate on the same methodology?
the two Logical operators seen as one and the Conditional (ternary) Operator
are all three Logical operators?
I am tagging them in all of the programming languages that I know they all can be used in so I can get a over all truth to this question(s).
I do pray that I have not confused anyone on this. it yes then it is probably due to my confusion on it.