3.2. Boolean

3.2.1. Thruthness constants

In Èq There is two magic constant for truthness :

They cannot be used directly in arithmetic operations, but can be combined using the logic operators (Operators)

3.2.2. Generating truthness using comparison

Truthness is used as parameter to some functions (notably the :ref:py:if one), and can be created using one of the comparison operator.

$ eq eval '[3 > 5, 3 < 5]'
[ false, true ]

3.2.3. Combining truthness

true and false react to the well known operators & (and) and | (or)

$ eq eval '[true & false, false & true, false & false, true & true ]'
[ false, false, false, true ]
$ eq eval '[true | false, false | true, false | false, true | true ]'
[ true, true, false, true ]

Table Of Contents

Previous topic

3.1. Matrix

Next topic

3.3. Lists

This Page