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

Controls If statement

Flow control if statement selects exactly one of the suites by evaluating the expressions one by one until one is found to be true; then that suite is executed (and no other part of the if statement is executed or evaluated). If all expressions are false, the suite of the else clause, if present, is executed.

Block XML representation

XML representation of controls_if block

<xml xmlns="http://www.w3.org/1999/xhtml">
  <block type="controls_if">
    <mutation elseif="1" else="1"/>
    <value name="IF0">
      <block type="logic_boolean">
        <field name="BOOL">TRUE</field>
      </block>
    </value>
    <value name="IF1">
      <block type="logic_boolean">
        <field name="BOOL">FALSE</field>
      </block>
    </value>
  </block>
</xml>

Example of visual representation

Block "If do"

Block “If do”

Example of block usage

"If do" - the decision

“If do” - the decision