Re: how do people feel about exit function from loop

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Funny, that's the exact same thing I've said about Exit For, and exactly how
I feel about it. The fact that it makes your code a line or two shorter
isn't a reason to code it that way every time. Use it if you really need
it, but ALWAYS (never mind "most often"), there are ways around it anyway.
<g>


Rob

"Michael C" <nospam@xxxxxxxxxx> wrote in message
news:OvwzL0lzHHA.4004@xxxxxxxxxxxxxxxxxxxxxxx
"Steve Gerrard" <mynamehere@xxxxxxxxxxx> wrote in message
news:yYqdnVJqtIw8OjvbnZ2dnUVZ_gmdnZ2d@xxxxxxxxxxxxxx
I am not opposed to exit for, in fact I quite like Larry's solution to
the OP's task. But I often find that after the loop, I need to know why
it ended - found the thingy, or ran out of places to look. I am now jaded
enough to believe that even if I don't need it today, and can't see how I
ever would, eventually I will need to know it for some reason, so might
as well set it up that way. Sigh.

This is not a reason to code this every single time. Just add it when and
if you need it. Most often there are ways around it anyway.

Michael



.



Relevant Pages

  • Re: Domain Cloning
    ... What's the reason for having an exact same domain? ... Please describe more in detail the reason for this clone. ... 6.On the day when the network is seperated, seize the Forest and ...
    (microsoft.public.windows.server.migration)
  • Re: becoming a daemon
    ... what is the reason to create child and then ... so that the parent won't get SIGCLDs anymore. ... _exit is the system call; exitis the libc wrapper that also ...
    (comp.unix.programmer)
  • Re: The Year 2038 Problem
    ... >>maker to your car engine's sparkplugs stopping working on the exact ... >The only reason it didn't happen was because we fixed it. ...
    (comp.lang.c)
  • Re: exit options in Debug mode
    ... completely when my program encounters the exit() command (as opposed to ... staying open until user press a key). ... The reason I'm doing this instead of just building in Release mode is ...
    (microsoft.public.vc.language)
  • Re: My new KH/Schlumpf 36!!!
    ... I find myself consistently downshifting now, ... worse at upshifting for some reason. ... Same exact thing happened to me. ...
    (rec.sport.unicycling)