I understand the functionality of continue. I also understand it
doesn't work in VB.Net 2003, right? It does in 2005, right?
I understand why goto is not generally a good thing but just because a
command has been frequently misused in the past doesn't make it bad. I
admire Herfried for suggesting goto. It seems like a perfect use.
Still I'm having a hard time using it because other say it's wrong.
It's a real conundrum. There has to be a way that socially acceptable
and personally feels right.
An outer loop is what I have started with because goto has been out of
my vocabulary since 87. Still I just don't like seeing one loop
inserted inside another just for this functionality. It looks funny and
just seems wrong. I'll come up with a better way. Something in the
nature subroutines and flags etc. I'll get something that feels better
when I get back to work tomorrow.
dotNuttah wrote:
cj wrote: When 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?
The meaning of "continue" is to start the *next* iteration immediately and
bypass any further code in the loop body. If you want to continue the
current operation then you'd either have an inner loop or use a goto. If you
want to completely restart the loop then you'd be best enclosing it in an
outer loop. You mustn't use the goto idea for that one. Jumping out of the
loop to before the loop - that should get you those frowns. ;o)