QueScript / Reference / <if>¶
<if true="{expr}">
Simple Example¶
<while name="whileLoop" init="{:whilevar = 0}" condition="{whilevar lt 100}" next="{whilevar = (whilevar + 1)}">
<if true="{whilevar lt 50}">
<print>inside while below 50: {whilevar}</print>
<else>
<print>inside while above 50: {whilevar}</print>
</else>
</if>
</while>
<wait anim="whileLoop"/>
Attributes¶
- true = its {expr} has to be true (>= 1) to execute the content, otherwise <else> is called, if it exists
- false = its {expr} has to be false (0) to execute the content, otherwise <else> is called, if it exists
Child Commands¶
- <[[else|QS1-else-cmd]]>
- <expr>
- <print>
- <send>
- <osc>
- <out>
- <trigger>
- <if>
- <while>
- <anim>
- <play>
- <stop>
- <pause>
- <resume>
- <shutdown>
- <debugger>
Explained¶
the <if> cmd works like 'if' in classical langauges