Logical operators

Top  Previous  Next

Scripts > Class elements and c++ instructions > Interpreted C++ instructions > Operators > Logical operators

 

Syntax

 

logical-AND-expr  && inclusive-OR-expression

 

logical-OR-expr   || logical-AND-expression

 

! cast-expression

 

Remarks

 

Operands in a logical expression must be of scalar type.

 

&&        logical AND; returns true only if both expressions evaluate to be nonzero, otherwise returns false. If the first expression evaluates to false, the second expression is not evaluated.
||        logical OR; returns true if either of the expressions evaluate to be nonzero, otherwise returns false. If the first expression evaluates to true, the second expression is not evaluated.
!        logical negation; returns true if the entire expression evaluates to be nonzero, otherwise returns false. The expression !E is equivalent to (0 == E).


This page belongs to the TextTransformer Documentation

Home  Content  German