Skip to content

Comparison operators

Mel Florance edited this page Jul 23, 2020 · 5 revisions

Bird Lang contains the following operators:

Symbol Name
== Equality
!= Difference
> Greater than
< Less than
>= Greater or equal
<= Less or equal

Equality

You can check the quality of two factors using the == operator:

Example:

> 3.14159265 == PI
true

Difference

You can check the difference of two factors using the != operator:

Example:

> 1.618 != 1.6
true

Greater than

You compare the greatest factor using the > operator:

Example:

> 1 > 2
false

Less than

You compare the lowest factor using the < operator:

Example:

> 1 < 2
true

Greater or equal

You compare the greatest or equal factor using the >= operator:

Example:

> 1 >= 2
false

Less or equal

You compare the lowest or equal factor using the >= operator:

Example:

> 1 <= 2
true

Clone this wiki locally