4 ms·Switch + goto is the classic way to implement a state machine in C.by garethrowlands 2y agoSwitch + goto is the classic way to implement a state machine in C.