Repeating loop

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a while loop which seems to run twice, I call one routine from another
once the first loop is completed it returns to the calling routine (the line
above) and runs again

Calling routine()
{
ComboBox.FindStringExact(Textbox.text); // routine to be called runs from
the
//next line
then returns to this line and
//re-runs
RoutineToBeCalled again
RoutineToBeCalled()
}
RoutineToBeCalled()
{
int=0;
while(i<6)
{
do work
i++;
}
}

Not easy to explain but the order is..
Combo.Findexacttext(etc)
RoutineToBeCalled()
Runs loop
Returns to Combo.Findexacttext(etc)
RoutineToBeCalled()
Re- Runs
Finishes
 
NCrum said:
I will (having read your note) attempt to put something simple together but
how do I get this to you? I cannot attach anything to this or do you just
want complete code listing

Complete code listing inline in a newsgroup post is probably the best
way. I'll update the web page to make this clear.
 
NCrum said:
Thanks, both of you, I have made a small app which seems fine so I
need to work through the real code and see the difference

I refer to a statement in Jon's side note suggesting that I may solve
it myself this way!!

In this particular case, I'd almost be surprised if you didn't :)

If you'd care to have another look at the page
(http://www.pobox.com/~skeet/csharp/complete.html) and let me know if
it's a bit clearer now, that'd be great. I post that link quite often,
so it would be good to make the page as helpful as possible.
 
Back
Top