|
>And what is wrong with LEAVE? It hardly >creates spaghetti code as the program flow >is always in the one direction. I like to refer >to a LEAVE as a structured GOTO!!!!! >From a readability point of view, having multiple exit points means that you must visually scan every line of code in the routine to see where and when it can pop out. This is in contrast to a routine that sets a return code and ONLY leaves from the bottom. You don't need to scan the entire routine to see where you come out because there's only one exit point. Having said that, I personally use LEAVE and ITER; especially in validity checking routines where the alternatives are worse. But in my vanity, I like to believe that I _think_ about the alternatives before automatically settling on GOTO and relatives. --buck "To find fault is easy; to do better may be difficult" --Plutarch
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.