Logical Operators
Previous Topic  Next Topic 

Logical Operators:


Expression

Result

A and B

TRUE if A is TRUE and B is TRUE.

A && B

TRUE if A is TRUE and B is TRUE (C style).

A or B

TRUE if either A or B or both are TRUE.

A || B

TRUE if either A or B or both are TRUE (C style).

not A

TRUE if A is FALSE; FALSE is A is TRUE.

! A

TRUE if A is FALSE; FALSE is A is TRUE (C style)