Overview

Logical Operations enable that comparison of different values and return a boolean (0 for FALSE and 1 for TRUE) indicating the results of the comparison.

Operators

Operator

Description

==

Equals

!=

Not Equals

||

Logical OR: Left-hand side or right-hand side must be true for the larger logical operation to be true.

&&

Logical AND: Left-hand side and right-hand side must be both true for the larger logical operation to be true.

<

Less than

<=

Less than or equal

>

Greater than

>=

Greater than or equal

 

Examples

variable == 2

variable != 1

(variable == 1) || (variable == 2)

variable < 3

More Information