| ??? 11/16/06 21:32 Read: times  | 
#128127 - Style Responding to: ???'s previous message  | 
Neil Kurzman said: 
just switch on the state variable. Sure - and that's the way I do it on 8051s. But you need to switch for each state and each event - so each state case has a nested switch for all the events. This can soon get very cumbersome, especially where certain events are handled the same way in most states... But the table-driven approach is easier to maintain - adding/removing states and/or events is simply a matter of adding/removing entries in the table.  | 



