nested while loops, inside loop not stopping correctly 
Author Message
 nested while loops, inside loop not stopping correctly

Teresa,

A state machine is a while loop, with a case structure inside.  The
loop executes repeatedly, until the "exit" state sends a "stop" to the
while loop.

I am in the process of reviewing your code, and will email the results
to you.  I wanted to post here because this may be a common problem.

You can also go to the Topics section.  There is some discussion there
about program designs, which a state machine is.  There is a sample
posting there of mine that is kind of a state machine (with execution
and reiteration controlled outside of the program, by a caller.)  This
will give you something of an idea.

Additionally, you can search NIs website for examples of state
machines.  These are prolific designs, and you should be able to find
one.

If you cannot, please let me know and I will create a simple example
and place a copy on the design discussion Topic on this site.

Good luck.



Sun, 26 Dec 2004 01:36:35 GMT  
 nested while loops, inside loop not stopping correctly
Hi VT92,

I tried to run the modified code, but it would execut one iteration
then stop.

Terry



Sun, 26 Dec 2004 02:16:59 GMT  
 nested while loops, inside loop not stopping correctly
Well, slap me upside the head.  I guess that was too easy.  I have it
working now.  Thanks for the help.


Sun, 26 Dec 2004 04:05:11 GMT  
 nested while loops, inside loop not stopping correctly
I have posted a simple (and working, what a bonus!) state machine in
the Discussion about Designs in "Topics" at the bottom of the overview
page.


Sun, 26 Dec 2004 04:30:13 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Problem with loop inside other loop

2. Fast loop inside a slow loop?

3. assigning to do loop control variables inside the loop

4. Expect while loop inside a while loop

5. For Loop Not Terminating Correctly?

6. nested loop is not working...im new

7. Style question: to loop or not to loop?

8. i have a for loop inside of while loop.when i press stop for...

9. Pasing data from a While Loop inside a case structure, located inside the while loop.

10. how to nest while loops

11. A puzzle - nested for-loops

12. Smalltalk rocks, and a newbie question ( nested loops ).

 

 
Powered by phpBB® Forum Software