Logical Operations
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.
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 |
variable == 2
variable != 1
(variable == 1) || (variable == 2)
variable < 3
Operations: Arithmetic, Bitwise, Logical, and Precedence
Functions: Arithmetic and Document