|
Using an indicator variable cannot be the best solution. I'm not saying leave/iter is the best, but your solution leads to code duplication. And we all know what code duplication leads to in the long run, from both theoretical and practical perspectives. :-( Regards. -- Antoine CONTAL I should know better to get involved. This is partly a matter of taste, although in matters of style I'm always right.<g> Having been raised on the single exit point theory, I find the code sample with the leaves harder to read than the one without. For cases like this I think I'd use an indicator variable called "done" and set it in every exit situation. I'd probably use a character or numeric variable called something like leave_mode to contain the reason for ending the loop. This may just be a Pascal flashback, but my way, strangely enough, is more readable to me. <g> Dow NOT done; exfmt screen; select; when F3; done = *on; when cond1; leave_mode = cond1stuff(); done = *on; ........... enddo; //execute code that relies on leave_mode value Les informations contenues dans ce message sont confidentielles et peuvent constituer des informations privilegiees. Si vous n etes pas le destinataire de ce message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d en utiliser tout ou partie. Si vous avez recu ce message par erreur, merci de le supprimer de votre systeme, ainsi que toutes ses copies, et d en avertir immediatement l expediteur par message de retour. Il est impossible de garantir que les communications par messagerie electronique arrivent en temps utile, sont securisees ou denuees de toute erreur ou virus. En consequence, l expediteur n accepte aucune responsabilite du fait des erreurs ou omissions qui pourraient en resulter. --- ----------------------------------------------------- --- The information contained in this e-mail is confidential. It may also be legally privileged. If you are not the addressee you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return e-mail. E-mail communications cannot be guaranteed to be timely secure, error or virus-free. The sender does not accept liability for any errors or omissions which arise as a result. $!2$!
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.