"break" statements

Doug Gwyn <gwyn> gwyn at brl-tgr.ARPA
Sun Nov 3 09:30:22 AEST 1985


> Do you also object (it's EXACTLY the same argument) to having more
> than one "return" statement in a function definition?

In theory, he should.  The objection to break and return
from the middle of a block is that there are then multiple
exits from the block.  This makes it more difficult to
establish clean termination conditions and loop invariants
for verifying the correctness of the code.  Of course, few
C programmers worry about this!  :-)



More information about the Comp.lang.c mailing list