• Subject: RE: ILE RPG:Is the use of ITER & LEAVE Structured Programming?
  • From: Ed.Doxtator@xxxxxxxxx
  • Date: Thu, 23 Apr 1998 14:14:17 +0100


Buck wrote
>Rather than fuel the infamous debate over exactly which opcodes
>are structured opcodes, let me say that we write structured code
>for a purpose: to be more reuseable and to be more maintainable.
>"Structured code" is not the goal; it is the tool to reach the goal.
>It is rarely profitable to insist that the tool is more important
>than the end-result.
>Just my chunk-o-change...

I agree, Buck.  Writing code is always an "eyes on the prize" thing, with a
view to future maintainability and expansion.  Problem is, opcodes like
ITER and LEAVE do not lend themselves to maintainability and expansion.  I
personally find them as thorny to debug as a set of left-hand indicators.

Whenever I've seen anyone use ITER and LEAVE it starts out well, but the
code ends up becoming monolithic in nature, and incredibly fiesty to debug.
One of my co-workers said about programming:  "Remember, for every two
hundred lines of code in a routine, there's two subroutines DYING to get
out."  It's a reasonably good rule of thumb, I think.

It's true, ITER and LEAVE do the job, but there are better things out
there.  Like:  DOW...ENDDO and DOU...ENDDO loops.  Design.  Subroutines.
Procedures.  Functions.  Modules.  Subprograms.  Service programs.  Voodoo.
Stuff like that.  The right tool for the right job.

Just my 2p...

-Doc


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.