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

Logic comparison

The comparison block is used for comparing two values together and return the boolean value representing the result of required logical operation.

The block has a left comparative value followed by a required operator and then a second value for comparison.

Available operators:

  • EQ - equality
  • NEQ - non equality
  • LT - lesser than
  • LTE - lesser or equal than
  • GT - greater than
  • GTE - greater or equal than

Block XML representation

XML representation of the logic_compare block

<xml xmlns="http://www.w3.org/1999/xhtml">
  <block type="logic_compare">
    <field name="OP">EQ</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">FALSE</field>
      </block>
    </value>
  </block>
</xml>

Example of visual representation

"Compare" block

“Compare” block

Example of block usage