Re: Conceptual problem solved by GOTO

new topic     » goto parent     » topic index » view thread      » older message » newer message

Matt Lewis wrote:

> exit "label" still goes to the end.  The question is, the end of which
> loop?  The pre-4.0 exit only went to the end of the innermost loop.  The
> post-4.0 exit allows the coder to specify which loop to exit.

If the question were limited to...

  EXIT 'label'
vs.
  EXIT [number of levels]

It seems obvious to me that a label is much to be preferred to a count.


However, in both cases you are no longer strictly structured.  I would
say that EXIT when used to leave the innermost loop is structured.

SKIP (I find myself liking this better than NEXT or CONTINUE) to skip
to the end for another iteration is also structured IMHO.

If you have fallthru in a case structure EXIT to the end of the cases
is structured as well, although fallthru itself isn't.  I don't object
to it either way.  I believe fallthru adds a burden on the programmer
that isn't needed.

I would prefer that EXIT did one predictable thing only.  But that's just me.

See, I'm adaptable (in a rocks for brains kind of way blink


"Science is the belief in the ignorance of experts." - Richard Feynman

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu