| Using Stateflow | Search  Help Desk |
Example: Noncyclic Behavior Flagged as a Cycle
This Stateflow diagram shows an example of noncyclic behavior that the Debugger flags as being cyclic.
A becomes active and i is initialized to zero. When the transition is tested, the condition [i < 5] is true. The condition actions, increment i and broadcast event E, are executed. The broadcast of E when state A is active causes a repetitive testing (and incrementing of i) until the condition is no longer true. The Debugger flags this as a cycle when in reality the apparent cycle is broken when i becomes greater than 5.