Kurt Edmiston said:
> Coming from C++-land, I've always been taught over and over again
> that all subroutines/functions/blocks/etc should have only a single
> entry point and a single exit point.
Works great in theory ;) Especially if you have exceptions.
It's just not practicle/readable to always code like that in real life,
though. I would tend to reserve such things for block-local catastrophes,
however; if the block ever gets modified an early return might screw
something else up.
> I still adhere strictly to the "one way in, one way out" philosophy,
> mainly for the sake of readability.
Yowzah-I've found that w/o exceptions that having a wad of nested if's/etc.
tend to make things _more_ unreadable.
> Also, I was wondering if exiting prematurely like this from a program has
> any adverse affects on the execution of the program.
It'll stop the program ;)
Dave