× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



... so what are you saying with respect to the topic at hand? I can't tell.

Yes, back when it mattered, inline was always the preferred approach. I
used to have color-coded subroutines in punched cards that I would literally
insert into my code deck for precisely that purpose. Computers are a tad
faster now. :)

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
The 50-50-90 rule: Anytime you have a 50-50 chance of getting something
right, there's a 90% probability you'll get it wrong.


A good system/program design should have high cohesion and low coupling.
IMO, this is basically impossible when using RPGII, RPGIII, or RPG/400,
since all variables are global - unless you turn the subroutines into
called
subprograms.

BTW, when I was learning RPGIII on the System/38 in 1983, IBM was
telling us
(for performance reasons) to NOT use subroutines, instead to use all
in-line
code...

- sjl


Dennis wrote:

I suspect (hope) that Scott was referring to new development or new
functionality here. Certainly, if a new "function" is needed in a
program,
go after the procedure approach instead of subroutines. But I would
caution
that the CONVERSION from subroutines to procedures cannot always be
taken
lightly, especially when you start to use some of the key advantages
of
procedures, like localized data. Too many times I have seen
subroutines
that perform some function, and while they're there they'll
inconspicuously
set some esoteric variable (often with a great name like @ or $ or
some
such
- say the result of a %LOOKUP), and the rest of the program is
supposed to
understand that @ has been set in subroutine XYZ. (I don't condone
this
sort of weak association, but we have to recognize that it exists.)
Now
if
you take XYZ and convert it to a procedure, and unwittingly make @ a
local
variable, the program stops working. If a lot of maintenance has
been
done,
it may take quite a bit of debugging to figure out what has gone
wrong,
especially if you also took this opportunity to give @ a better name.

But as Scott said, the result is definitely worth while, and what you
learn
will benefit YOU as much as or more than it will benefit someone else.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.