Hi, I need an easy example for understand an FSM in C++. Thanks, in advance........ Ricardo
On Thursday 25 March 2004 10:39 am, Ricardo Lopez Camino wrote:
Hi, I need an easy example for understand an FSM in C++. Thanks, in advance........
Go to google an type: C++ "finite state machine" You should read your lessons and learn this stuff (FSMs). It is important and real world. Best Regards. -- _/_/_/ Bob Pearson gottadoit@mailsnare.net _/_/_/ "The best way to get information on Usenet is not to ask a _/_/_/ question, but to post the wrong information." - Aahz' Law
On Thu, 25 Mar 2004 10:54:25 -0500 Bob Pearson <gottadoit@mailsnare.net> wrote:
On Thursday 25 March 2004 10:39 am, Ricardo Lopez Camino wrote:
Hi, I need an easy example for understand an FSM in C++. Thanks, in advance........
Go to google an type:
C++ "finite state machine"
You should read your lessons and learn this stuff (FSMs). It is important and real world.
Best Regards. --
You're right, but I'm consulting in this list; because google didn't help me or the results aren't I hope. And maybe, anybody can do it. However, thanks.... P/D: my apologies, my english is terrible. Ricardo Lopez Camino
Ricardo Lopez Camino wrote:
On Thu, 25 Mar 2004 10:54:25 -0500 Bob Pearson <gottadoit@mailsnare.net> wrote:
On Thursday 25 March 2004 10:39 am, Ricardo Lopez Camino wrote:
Hi, I need an easy example for understand an FSM in C++. Thanks, in advance........
When you code, in any language, you quite often uses an FSM. For, example, this is an state machine I often use (when I can't use getopt): uint state = 0; for(uint i = 0; i < argc; ++i) { if(state == 0 && strcmp(argv[i], "-i") == 0){ state = 1; } else if(state = 1) { input = optarg; state = 0; } else if(state == 0 && strcmp(argv[i], "-o") == 0) { state = 2; } else if(state = 2) { output = optarg; } else { usage(argv[0]); exit(1); } } You probably want a library where you can draw your graph with transitions and let it do the hard work. There are several of these out there, with stuff like states minimization and so on. But none of them is really popular. Maybe you should look at ragel library. But, most often, you end up writing code yourself. []s Davi de Castro Reis
On Thursday 25 March 2004 16:39, Ricardo Lopez Camino wrote:
Hi, I need an easy example for understand an FSM in C++. Thanks, in advance........
If you enlighten us what you mean with "FSM", maybe somebody can help. CU -- Stefan Hundhammer <sh@suse.de> Penguin by conviction. YaST2 Development SuSE Linux AG Nuernberg, Germany
I beleive he is referring to Finite State Machines also known as Finite State Automata. without such understanding computers could not exist. In my university that was a senior level course. Sorry no links come to mind. CWSIV On Thu, 2004-03-25 at 07:56, Stefan Hundhammer wrote:
On Thursday 25 March 2004 16:39, Ricardo Lopez Camino wrote:
Hi, I need an easy example for understand an FSM in C++. Thanks, in advance........
If you enlighten us what you mean with "FSM", maybe somebody can help.
CU -- Stefan Hundhammer <sh@suse.de> Penguin by conviction. YaST2 Development SuSE Linux AG Nuernberg, Germany
participants (5)
-
Bob Pearson
-
Carl William Spitzer IV
-
Davi de Castro Reis
-
Ricardo Lopez Camino
-
Stefan Hundhammer