トリガー ステート マシン言語では、ステートごとに 1 ~ 3 方向の条件分岐がサポートされます。
- 1 方向分岐では、if/elseif/else/endif 構文は使用されず、goto アクションが使用されます。
state my_state_0: goto my_state_1;
- 2 方向分岐では、goto アクションと共に if/else/endif 構文も使用されます。
state my_state_0: if (<condition1>) then goto my_state_1; else goto my_state_0; endif
- 3 方向分岐では、goto アクションと共に if/else/elseif/endif 構文も使用されます。
state my_state_0: if (<condition1>) then goto my_state_1; elseif (<condition2>) then goto my_state_2; else goto my_state_0; endif
上記に <condition1> および <condition2> で示されている条件文の作成方法は、「条件文」セクションを参照してください。