× 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.



On 8 September 2015 at 20:24, Booth Martin <booth@xxxxxxxxxxxx> wrote:
It was suggested to me that we should be using PR & PI instead of
subroutines. Is that a good suggestion?

Being forced to blindly apply a simplistic rule is a Giant Red Flag for me.

In general, I think in functions and therefore find subprocedures to
be a better way to express my thoughts. But when I'm in existing code
that is chockablock with subroutines, there is no way on earth I'm
going to refactor them all in order to satisfy some git's idea that
There Shall Be No Subroutines For They Are Bad.

The absolute worst example I have personally seen consisted of a BEGSR
/ ENDSR with many hundreds of lines of code between them Due to the
No Subroutines Rule, our intrepid programmer deleted BEGSR, replaced
it with PI B, deleted ENDSR and replaced that with PI E, added a PR
with no parameters, changed EXSR to CALLP and was declared 'subroutine
free'.

This is a ghastly perversion of what a subprocedure could be: what it
/should/ be. Don't be that programmer. Don't 'convert' subroutines
to subprocedures. The very fact that they are subroutines warns me
that icky code lies in there, and I must tread lightly.

Does that include *INZSR too?

That depends on how *INZSR is used. You can roll your own, but what
is the benefit?

I doubt that helped much. I've written some thoughts down before, so
without boring the list via repetition:

http://archive.midrange.com/rpg400-l/201301/msg00408.html
http://archive.midrange.com/rpg400-l/201104/msg00202.html
--buck

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.