Comparisons
Comparison operators can be used in conditions and loops.
| Operator | Meaning |
|---|---|
< | Less than |
> | Greater than |
<= | Less than or equal |
>= | Greater than or equal |
== | Equal |
!= | Not equal |
Example:
If (A < B)
{
Print("A is smaller");
}
Comparison expressions are evaluated to a Boolean condition. They appear in If / Else If conditions, While loop conditions, and the condition position of a For loop.
Boolean values can also be used directly in conditions, since true and false are themselves valid conditions. See Types for details.