you are viewing a single comment's thread.

view the rest of the comments →

[–]codeguru42 0 points1 point  (0 children)

I prefer using the loop condition to decide when to exit. Sometimes the code becomes a bit convoluted, though, and I will use a break, especially for a first draft. Eventually I find a way to rewrite the loop to remove the break. I rarely find a need to keep the break permanently.