Re: I miss loop
- From: cj <cj@xxxxxxxxxxxxx>
- Date: Thu, 16 Mar 2006 08:15:26 -0500
Yes, that'll also work.
Sebastian wrote:
I think you may have misunderstood the suggestion for using goto. Make the goto go to the end of the loop, not the beginning, and you get exactly the functionality of a continue statement, no messy inner loop..
Ex:
do
.
if something goto LoopContinue
.
.
.
if something goto LoopContinue
.
if something goto LoopContinue
.
LoopContinue:
while continue
cj wrote:I thought about that this AM but after all the thought I have a double do loop.
do
do
.
if something exit do
.
.
.
if something exit do
.
if something exit do
.
while innerLoop
while continue
Not beautiful but it was time to make a decision and move on. Couldn't bring myself to use goto.
Scott M. wrote:How about making the loop in its own procedure that can take the appropriate arguments you'll need to use to determine if the loop "is going well and should continue"?
You can still exit from the loop (or from the sub if the loop is in one) if you need to and you'd be able to re-call the loop/procedure and pass it what it needs to begin again.
"cj" <cj@xxxxxxxxxxxxx> wrote in message news:ex3Rt36RGHA.1572@xxxxxxxxxxxxxxxxxxxxxxxWhen I'm inside a do while loop sometimes it's necessary to jump out of the loop using exit do. I'm also used to being able to jump back and begin the loop again. Not sure which language my memories are of but I think I just said loop somewhere inside the loop and it immediately jumped back to the start of the loop and began again. I can't seem to do that in .net. I this functionality available?
- References:
- I miss loop
- From: cj
- Re: I miss loop
- From: Scott M.
- Re: I miss loop
- From: cj
- Re: I miss loop
- From: Sebastian
- I miss loop
- Prev by Date: Re: I miss loop
- Next by Date: Re: Name 'ADODB' is not declared Error
- Previous by thread: Re: I miss loop
- Next by thread: best way to tell if a date is not assigned?
- Index(es):
Relevant Pages
|