|
> From: Peter Dow (ML) > > Hi Joe, > > Regarding your 2nd point, I've run into that more than once, and find that > simply having the procedure put the value to be returned into a temporary > variable takes care of the problem. I agree, you CAN have multiple returns if you take a little bit of care in so doing. And the concept of "return (b + c)" can be difficult to debug even if it's the only return in the routine. The point is that, in just about any of these arguments, it's not a religious issue, it's simply a practical one. Write your code as if someone other than you will be debugging it, because chances are that will be the case. Avoid "clever" code because even if it's you doing the debugging, it may well be a different you -- one who forgot why you did the clever programming in the first place <grin>. (And if you guessed that I'm speaking from experience, you'd be correct!) Joe
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.