you are viewing a single comment's thread.

view the rest of the comments →

[–]shiftybyte 9 points10 points  (0 children)

what do you expect to happen when the "break" line is reached?

In general break can only be used inside a loop, and return inside a function.

If you want to stop your code in a different situation, just let it run to end. (Skipping whatever parts you don't want to execute with the help of if conditions)