| ??? 11/16/06 22:00 Read: times  | 
#128130 - Huh? Responding to: ???'s previous message  | 
Neil said: 
just switch on the state variable Andy said: 
Sure - and that's the way I do it on 8051s. Why not use the table-driven approach on the 8051? It is so much better, as you describe below. Andy said: 
 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.  | 



