......somehow you got it into your head that
what I told you what you were doing was wrong.
All I said is that you shouldn't use (i) the way you were
doing it, because that could lead to the loop blowing.
Please explain the logic of the above.
Me and everyone else:
loop could blow == doing something wrong
You:
loop could blow != doing something wrong
Please, let's forget about your little loop example. Let's just take dealing
with the idx counter on the loop, period.
This entire discussion is about the loop. If you want to talk about
something else, start another thread.
Under normal circumstances, one doesn't mess with the count idx. It's a best
programming practice that's used by many.
Yes, because it used to be the CX register, and if you changed the
variable, CX didn't change. I agree. But, times have changed. I
agree that it's still ugly, but mostly due to the past. Since, it is
guaranteed to work today, so we are allowed to change it. Still ugly,
yes, since it's the loop iterator, and it should be left to do what it
should do. I agree.
Most use another variable an indirect method to control the loop, if they
need a way of terminating out of the loop based on the iteration count.
Yes, I agree.
So your way works
Yes, thank you. So my loop will not blow. That's what I thought. We
are now all in agreement.
>, big deal.
Sorry, but you're the one making it a big deal. That's what happens
when you say legitimate code is faulty. You said it would blow. It
wouldn't. It's just ugly code, not wrong. Two different things.
Your way would simply not be the way I would do
it. I would never let your way come through a code review if you were
setting in front of me.
I agree. That's EXACTLY why I asked to find the better way.
It's a bad habit a lazy habit of programming, that could lead to trouble in
the long run in other areas where you worked a project.
I agree.
I would never directly start controlling the idx counter of a loop. the way
you're doing it.
Me neither.
Your way should never hit the light of day IMHO. Is it wrong, no it's not
wrong. Is it a best practice, no it's not a best practice either.
My way is legitimate code that will never blow up. But it's ugly
code, since it hides the what the loop iterator does, since it is
changed inside the loop. So, it's horrible practive. Thus my search
for a better solution. Thanks to this group, I found it.
That's just the way I was taught.
You were taught well.
This will be my last post on this subject, because I am through with you and
anybody else that needs to make a comment. There will not be a return reply.
It won't be read by me, because I am moving on.
Please, stop with the drama.
Zytan