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



And that's a good way to evolve.

Stop using subroutines, no matter how simple.  And use subprocedures 
instead.  While the subroutine may be too simplistic to make sense to 
bother with the PR's and PI's it's a good discipline to stick to it as a 
"Commandment from God" for two to three months just to get into practice. 
And then, only then, go back to using subroutines when it's really 
simplistic.  Or you have some special need like having RETURN exit the 
program and not just the subprocedure.  (There are those who feel that 
exiting a program from a subroutine is a violation of structured 
programming and is punishable by (your humorous situation here)).

Then as you evolve you can decide which subprocedures might make sense to 
move to a service program.

Rob Berendt
-- 
"They that can give up essential liberty to obtain a little temporary 
safety deserve neither liberty nor safety." 
Benjamin Franklin 




Ken Sims <mr3111@xxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
10/23/2003 03:28 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
rpg400-l@xxxxxxxxxxxx
cc

Subject
Re: Benefits of Sub-procedures






Hi Booth -

>Callable programs, RPGIV, %BIFS, and all of the other neat stuff can be 
>picked up a
>little at a time and brought into a shop but not sub-procedures. However,
>one must cross the sub procedures canyon in one giant step.

That's not true.  Procedures are not limited to service programs and bound 

modules.

You can write non-exported procedures in the same source as the main 
program such that you get all of the prototyping, return value, 
expressions 
as parameters, etc. benefits.  What you don't get is the ability to call 
that procedure from another program.

I started out this way, using what I call "internal procedures", well 
before I wrote my first service program.

Ken
http://www.ke9nr.net/
Opinions expressed are my own and do not necessarily represent the views 
of 
my employer or anyone in their right mind.

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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.