I\'ve always wondered how to write the \"A ? B : C\"
syntax in a C++ compatible language.
I think it works something like: (Pseudo
It works like this:
expression ? trueValue : falseValue
Which basically means that if expression
evaluates to true, trueValue will be returned or executed, and falseValue will be returned or evaluated if not.
Remember that trueValue and falseValue will only be evaluated and executed if the expression is true or false, respectively. This behavior is called short circuiting.