The trigger state machine language supports one-, two-, and three-way conditional branching per state.
- One-way branching involves using goto actions without any if/elseif/else/endif constructs:
state my_state_0: goto my_state_1;
- Two-way conditional branching uses goto actions with if/else/endif constructs:
state my_state_0: if (<condition1>) then goto my_state_1; else goto my_state_0; endif
- Three-way conditional branching uses goto actions with if/else/elseif/endif constructs:
state my_state_0: if (<condition1>) then goto my_state_1; elseif (<condition2>) then goto my_state_2; else goto my_state_0; endif
For more information on how to construct conditional statements represented above with <condition1> and <condition2>, refer to the section Conditional Statements.