Very few languages support nested procedures. PL/I anyone?


On Feb 5, 2018 5:36 PM, "Barbara Morris" <bmorris@xxxxxxxxxx> wrote:

On 2018-02-05 11:35 AM, john erps wrote:

To be clear,

I meant a subroutine *within* a subprocedure.

If you have some repeating code within a subprocedure that clearly belongs
(is specific to) the subprocedure it doesn't make much sense to make it a
full blown subprocedure, thereby falsely communicating that it may be some
generic code which it is not.

Just code a subroutine, which keeps the code clearly as part of the
subprocedure.


Just in case people missed it, there's an RFE for RPG to have nested
subprocedures.
https://www.ibm.com/developerworks/rfe/execute?use_case=
viewRfe&CR_ID=103682

Most of the time, when I want to abstract out some code within a
subprocedure, either a local subroutine or a separate subprocedure works
ok. But there have been a few times when it was too awkward to have a
separate subprocedure, and it would have been nice to be able to pass
parameters to the subroutine I eventually created.

--
Barbara

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.