Logmanager documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Logic boolean operators

Boolean operators are used to represent meaning of two input boolean values as one value. If or operator is used evaluation of result is simplified. Therefore it is sufficient when left value is True and right value is not checked.

Block is useful for use in conditional flow statements If.

Inputs Output
A B A and B A or B
True True True True
True False False True
False True False True
False False False False

Block XML representation

XML representation of logic_operation block

<xml xmlns="http://www.w3.org/1999/xhtml">
  <block type="logic_operation">
    <field name="OP">AND</field>
    <value name="A">
      <block type="logic_boolean">
        <field name="BOOL">TRUE</field>
      </block>
    </value>
    <value name="B">
      <block type="logic_boolean">
        <field name="BOOL">TRUE</field>
      </block>
    </value>
  </block>
</xml>

Example of visual representation

Logic boolean operator

Logic boolean operator

Example of block usage

Logical boolean operator - example

Logical boolean operator - example