HI, i am writing a program in which there are many do-while loops one inside the other... when i try compile this program... it gives me a error stating.."'{' scope stack overflow.." it point to braces i have used in DO-WHILE an IF statement... plss help me to solve this problem... THANKS...
DON'T SHOUT!!
No, there is no inherent need of a while(1) loop at each stage!
I suggest you look into using a Finite State Machine (FSM) aka "Finite State Automaton" (plural: Automata) or just "State Machine"
www.8052.com/.../171492
www.8052.com/.../47505
State Machines for Event-Driven SystemsState machines are perhaps the most effective method for developing robust event-driven code for embedded systems." by Miro Samek: www.netrino.com/.../State-Machines-Event-Driven-Systems
Coding State Machines in C and C++"An overview of state-machine fundamentals and guidelines for coding state machines in C or C++." by Miro Samek: www.netrino.com/.../Coding-State-Machines
This Whitepaper (with accompanying source code) gives a very good example of applying a State Machine design: www.visualgps.net/.../NMEAParser.html
Has moved to: www.barrgroup.com/.../Coding-State-Machines
Similarly: www.barrgroup.com/.../State-Machines-Event-Driven-Systems
We had someone do a firmware enhancement for us and he put in some finite state machines.
Trouble was he was so engrossed with them at the individual level that he neglected to include suitable protection (like task locking) on the interaction between them.
Careful. They are not the cure all. You still need good understanding of ALL aspects.
Good point.
There are no safe concepts that can't be abused by someone willing to try.
Innnndeeeeeeeeedddddd.