|
Hi Joel, <snip> 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 </snip> Yep, I use this too. I think the bottom line is that there are many ways to write effective, readable, maintainable code. The trick is to not limit yourself to just one. I think not using LEAVE or ITER in many circumstances is the right decision. In other circumstances, it might be better to use LEAVE and ITER. As a matter of personal preference, for screen loops I use DO *hival and explicitly leave via the LEAVE op-code. I also think a programmer's coding style changes, depending upon where s/he works, where s/he picked up the language, etc... We will probably find that we all code in our local "RPG dialect". For example, I started writing in RPG when I worked for Geac (JBA) in their central development team, and the code written by some of us guys was so similar you could only tell who wrote what by the comments (my comments did, and still do, end with three periods "..."). [of course, we ALWAYS mod-marked our code, but you get my point :-) ] In a similar vein, I always use DOW for read loops - I can't stand DOU, followed by that annoying IF! ;-) Cheers Larry Ducie
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.