Difference between revisions of "Operator Reference"

No change in size ,  11:42, 31 March 2017
imported>Plplecuyer
 
imported>Mattamue
Line 96: Line 96:
Logical operators evaluate to true or false values, based on their [[Expression Reference|expressions]].
Logical operators evaluate to true or false values, based on their [[Expression Reference|expressions]].
*The NOT operator (!) will be true if its single expression (to the left of the operator) is false, and false if it is true.
*The NOT operator (!) will be true if its single expression (to the left of the operator) is false, and false if it is true.
*The OR operator (||) will be true if one of the expressions to its left and right are true, and will short-circuit if the right expression is true (it will not evaluate the left expression at all).
*The OR operator (||) will be true if one of the expressions to its left and right are true, and will short-circuit if the left expression is true (it will not evaluate the right expression at all).
*The AND operator (&&) will be true if both of the expressions to its left and right are true, and will short-circuit if the right expression is false (it will not evaluate the left expression at all).
*The AND operator (&&) will be true if both of the expressions to its left and right are true, and will short-circuit if the left expression is false (it will not evaluate the right expression at all).


Examples:
Examples:
Anonymous user