+4

Continue

What is the usage of continue?! Is it to skip for the next value!!

9/21/2019 7:03:21 PM

Princess Ana

16 Answers

New Answer

+2

Thank you 🌸

+2

Jacob Burgess yes

+1

If you wany the loop to skip the rest of the current value commands you use continue

+1

Jacob Burgess thanks for the heads up. I had no idea of that issue.

+1

Continue It's used for skipping the current iteration of a loop... And starts with the next iteration.

+1

When control encounters continue it reaches the start of the loop to continue the iteration.

+1

Yes, it is to skip the rest of current iteration and move to the next one in a loop. Some purists don't like goto statements and probably extend it to break and continue. I think, if not overused, there is nothing wrong with continue and break which can get rid of program inefficiency and some unnecessary clock cycles if they were not used.

0

Ur welcome

0

its bad practive to use break and continue statments as for u dont want more that one exit . its like having a firedoor in a flamable house where its clear that a fireproof house would be ideal...

0

Jacob Burgess I don't understand why using continue and break statements would be bad practice?

0

Ulisses Cruz its like fixing something with ducktape where u could just fix it properly. https://softwareengineering.stackexchange.com/questions/58237/are-break-and-continue-bad-programming-practices#58253 https://stackoverflow.com/questions/11133127/why-it-is-a-bad-practice-to-use-break-continue-labels-in-oop-e-g-java-c its big contraversy. but personally i think its lazy coding. that being said it does have benifits in certain situations of which i do not have knowledge on. all my current and past CS teachers dock me points for the use of break and or continue.

0

Ulisses Cruz arent u a mod

0

Ulisses Cruz hmmm, so like your the one mod who doesnt know everything?

0

Terminates the current iteration

0

Yes, it skips from your current position in the loop to the next. It's useful in many ways.

0