fsm - revert to previous state (newbie)

B

bruce

Hi all,

I`m working on a fsm that looks up its transitions in some
dictionaries. I`ve defined a default transition to an "error_state"
that is launched when there is no match of input_symbol, state etc in
other dicts. The error state just prints out that user_input was not
defined. After this I want to revert back to the state before the
error, so the user can try again. My solution now is to update the
value in the dictionary state_transitions whose key is "state_error",
inside the fsm loop. This is not very elegant I think. Does anyone know
of a better way?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top