 Logic Operations
Calculations yes no

The yes and no elements are logic constants. They represent the flags of validity or non-validity of a logic term. and

The and logic operator returns the validity flag, if all logic terms entered as parameters are true (two or more terms can be entered). If some of the terms is false, the result of the logic operation, too, is false. or

The or logic operator returns the validity flag, if at least one of the logic term entered as parameter is true (two or more terms can be entered). If all terms are false, the logic operation result, too, is false. either or (exclusive or)

The either or logic operator returns the validity flag, if just one of two logic terms is true. If both terms are false, or, on the contrary, both are true, the logic operation result is false. Two or more parameters can be entered as operator parameters. The terms are evaluated from the top downwards, the result of a two-operand operation is used as the operand for the next operation. As a consequence, the logic operation result will be true, if an odd number of operands are true. For an even number of true operands the result will be false. is not valid that

The is not valid that logic operator is a logic negation. As a parameter one logic term is entered; the logic operation result will be the negation of the logic term validity.

Note: The "and" and "or" logic operators utilize the so called accelerated evaluation. If the logic operation result is during evaluation of the logic terms evident, no further terms are evaluated. Normally this will not manifest itself in any way except for the cases, when a function returning a logic value is incorporated in the logic terms, because this function need not be executed. Experienced programmers, however, use this fact to inhibit the function execution, if some of the previous functions has returned a false operation result.

Full Html Context Help of The Peter - Gemtree Software & Children Programming