C provides the infinitely-abusable goto statement, and labels to
branch to. Formally the goto is never necessary and in practice it is
almost always easy to write code without it. We have not used goto in
this book.
Nonetheless , we will suggest a few situations where goto's may find a
place. The most common use is to abandon processing in some deeply
nested structure, such as breaking out of two loops at once. The break
statement cannot be used directly since it leaves only the innermost
loop....
.....
Although we are not dogmatic about a matter, it does seem that goto
statements should be used sparingly, if at all.
I agree, the goto should only be used to IMPROVE code readability.
About break. I would like to see an implementation of Break(x) where x
is the number of loops to break out of.
Correction: I would not like this, I would LOVE it.
Andreas
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal