State Machines 101

The issue here is separating the design of the state machine from the actual coding. And to convince people to have trust in the process and to complete the design of the state machine before starting to code.

Once you have reached that point you can use any method you want to produce the code, it is totally secondary. So there we agree.

But one of the reasons for creating my library was having a 1:1 relationship between states and state functions. This simplifies the conversion from state diagrams to working code as i tried to show with my example.

JimboZA, CB, & all, good stuff.

My favourite example of a state machine was the stupid guy in the Goon Show who had the time written on a piece of paper.

...R