Each state is declared following all parameter and/or variable declarations, if any. States names are followed by a set of square brackets that contain all statements, functions and actions of the state. The square brackets must be specified even if a state contains no statements. States may not contain local variables, parameters, modules or other states:
Start [
If temperature > 150 Fill;
]
Fill [
valve = open;
If level > 36 Done;
]
Done [
]
Three states are declared - Start, Fill and Done. State names must be legal identifiers. Note how the third state has no statements, not even an action to change the state; if this state becomes active, it will remain the active state until the module stops.