-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unreachable code #7
Comments
cc : @LeeDoYup |
Lines 108 to 111 in 4185a8c
In this part, |
Yes this is correct, but if the solution does not converge ever, then the line at 117 Line 117 in 4185a8c
will never be executed since the loop starting at Line 89 in 4185a8c
is an infinite loop. therefore the solution must converge in order to return some result, else the loop will continue going on and on and will never exit |
does this not mean that there is no need of the line at line number 117? because that becomes unreachable anyways. |
Yes, you're right. The code needs to be correct for the unconverged situation. |
yes it must be 👍 |
Yes, I'll fix it. Of course, pull-request is always welcome ! |
what needs to be the change exactly? Cheers :) |
If you make pull-request about the infinite loop, i'll add comment about the codes and merge if it's okay. |
sure. Let me try ! |
To close to the issue, i will fix it. |
Hey @LeeDoYup |
I agree to set optional argument of the maximum number of iterations, and please make a PR. |
Looking to the code that @gabru-md shared, it is quite clear the required changes.
|
I was looking through the code base. I have an issue, can you please tell me whether this line is reachable or not?
Since it is working in an infinite loop, so there must be a break statement so that the flow of control can go out of the infinite loop sequence, but I cannot find any such break in the code.
If I'm missing something, then can you please point it out to me.
Thanks a lot in advance.
Manish Devgan
The text was updated successfully, but these errors were encountered: