Re: how do people feel about exit function from loop
- From: "Robert Morley" <rmorley@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 24 Jul 2007 20:08:55 -0400
But the same logic applies...if you're concerned about having one way out of
a function, it follows that you will likely be the type who also likes one
way out of a loop (for most of the same reasons), thus wanting to avoid
Exit.
Rob
"Michael C" <nospam@xxxxxxxxxx> wrote in message
news:eTstCwkzHHA.4916@xxxxxxxxxxxxxxxxxxxxxxx
"Steve Gerrard" <mynamehere@xxxxxxxxxxx> wrote in message
news:js2dnQMV9MvgizvbnZ2dnUVZ_sOrnZ2d@xxxxxxxxxxxxxx
Indeed, I find more and more that I like to declare a boolean expressly
for the purpose of controlling a loop, such as Found or Done. It makes
the code completely clear, it is easy to adjust the conditions where the
flag gets set, and it is useful following the loop for deciding what to
do next.
While Not Done
always makes perfect sense to me as a loop control.
Isn't an exit for that much simpler tho? You still get to have one way out
of a function if that is important to you (in 99% of functions it is not).
Michael
.
- Follow-Ups:
- Re: how do people feel about exit function from loop
- From: Michael C
- Re: how do people feel about exit function from loop
- References:
- how do people feel about exit function from loop
- From: greg
- Re: how do people feel about exit function from loop
- From: Ken Halter
- Re: how do people feel about exit function from loop
- From: Jan Hyde (VB MVP)
- Re: how do people feel about exit function from loop
- From: Steve Gerrard
- Re: how do people feel about exit function from loop
- From: Michael C
- how do people feel about exit function from loop
- Prev by Date: Re: drawing
- Next by Date: Re: Compacting a Random created file
- Previous by thread: Re: how do people feel about exit function from loop
- Next by thread: Re: how do people feel about exit function from loop
- Index(es):
Relevant Pages
|