Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Comparisons

Comparison operators can be used in conditions and loops.

OperatorMeaning
<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.


← Previous Next →