Re: Conceptual problem solved by GOTO
- Posted by ken mortenson <kenneth_john at yahoo.co?> Jun 06, 2008
- 756 views
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 "Science is the belief in the ignorance of experts." - Richard Feynman