You use logical operators to make comparisons of variables with other variables or constants. You frequently need to know if one variable has the same value, a lesser value, or a greater value than another variable. You generally use logical operators within If-Then statements and While loops to check whether conditions required for logical decisions are true or false. A list of the JAWS logical operators is shown below.
Operator |
Description |
== |
Two equals signs placed together ask if two values are equal to each other. For example, the statement (A == B) is true when a is equal to b. |
!= |
An exclamation point and an equals sign placed together determine if two values are not equal to each other. That is, is the value or expression to the left of the! = sign not equal to the value or expression to the right? For example, the statement (A != b) is true if A does not equal B. |
< |
A < sign asks if the first value is less than the second value. That is, is the value or expression to the left of the < sign less than the value or expression to the right side? For example, the statement (A < B) is true if A is less than B. |
<= |
A < than sign placed together with an equals sign asks if the first value is less than or equal to the second value. That is, is the value or expression to the left of the <= sign less than or equal to the value or expression to the right side? For example, the statement (A <= B) is true if A is less than or equal to B. |
> |
A > sign asks if the first value is greater than the second value. That is, is the value or expression to the left of the > sign greater than the value or expression to the right side? For example, the statement (A > B) is true if A is greater than B. |
>= |
A > sign followed by an equals sign asks if the first value is greater than or equal to the second value. That is, is the value or expression to the left of the >= signs greater than or equal to the value or expression to the right side? For example, the statement (A >= B) is true if A is greater than or equal to B. |