Re: if clause
- From: Al Balmer <albalmer@xxxxxxx>
- Date: Mon, 30 Oct 2006 16:05:52 GMT
On 30 Oct 2006 06:17:28 -0800, "Ancient_Hacker" <grg2@xxxxxxxxxxx>
wrote:
(1) Some people think a function should have just ONE clear exit
point, at the bottom. I realize that can get a bit long-winded, but it
can make the code MUCH CLEARER, much easier to set breakpoits, much
easier to add code you're SURE will get run every time. Multiple entry
points went out with FORTRAN II, why do we still have multiple exit
points in this 21sh century?
Because in some circumstances, it makes the code much clearer, much
easier to set breakpoints, and much easier to add code to individual
tests.
IOW, "some people" are not always right. In the example given, I would
prefer the form presented as a bad example :-)
BTW, what do multiple entry points have to do with multiple exit
points?
--
Al Balmer
Sun City, AZ
.
- References:
- if clause
- From: rogz
- Re: if clause
- From: Ancient_Hacker
- if clause
- Prev by Date: Re: if clause
- Next by Date: type identifier and OO design
- Previous by thread: Re: if clause
- Next by thread: Re: if clause
- Index(es):