Re: how do people feel about exit function from loop



"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


.



Relevant Pages

  • Re: for what are for/while else clauses
    ... the controlling condition is the test at ... If the loop results in some_action being done, say, 17 ... The only wrinkle then is that the while loop construct ...
    (comp.lang.python)
  • Re: Need Help: compiling old Fortran program
    ... the DO-loop varable within the range of the loop. ... compilers, there are two ways of controlling a do-loop, DO ... initialising the index to i1-i3 before the looping part, ...
    (comp.lang.fortran)
  • Re: how do people feel about exit function from loop
    ... the purpose of controlling a loop, ... it is easy to adjust the conditions where the flag gets ... and it is useful following the loop for deciding what to do next. ... I am not opposed to exit for, in fact I quite like Larry's solution to the OP's ...
    (microsoft.public.vb.general.discussion)
  • Re: Need Help: compiling old Fortran program
    ... the DO-loop varable within the range of the loop. ... In the history of ... compilers, there are two ways of controlling a do-loop, DO ...
    (comp.lang.fortran)
  • Re: Dry and dropper question
    ... Mike> Tie your dropper on, and mount your dry fly using a loop. ... If you want to adjust ...
    (rec.outdoors.fishing.fly)