Reasons why a for loop would exit without a break or return

Hi

Any specific reason why a for loop would exit prematurely without a break, addition to it’s integer, or resolution of its parameter?

I have one such instance where a for loop exits at 0 of 6 entries but no break, return or modification to it’s integer are present.

Aside stack overflow. Is possible I have a stack somewhere I am not consoled about?

Most likely it’s breaking early because the values you expect are not the values that are actually executing.

Posting the code in question usually helps.

Reasons for a for loop to exit would be:

  • The loop condition returned false
  • The return, break, or goto keywords
  • An exception was thrown.
1 Like

It is not a stack

Okay

So

To answer my own question

Yes!

There is a way to break a forloops without a break or return or succession of its parameter !!!

If the forloops parameter is depending on the existence of a private list. And the for loop runs a function that re allocated that private list to be shorter then you succeeded the parameter

Wow

That’s what happened to me there.

Feels kinda good to nail it down in your mind, doesn’t it? I love that feeling.

1 Like

I have a related topic - i post in a new thread about it in a moment.