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



I think that what you are saying is that if it's so simplistic that you 
don't want to bother with PI's/PR's then you wouldn't want to bother with 
BEGSR's/EXSR's.  Interesting thought.

By the way, I compiled a very simple program with a subroutine in it just 
to see if it generated any messages like RNF#### - list of subroutines. 
Nothing.  Too bad, if there was I bet you could have CHGMSGD and kicked up 
the severity to a higher number.  And that would have stopped the 
compiler.  I bet that's a technique not published in "How to Win Friends 
and Influence People".      :-)

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




G Armour <garmour400r@xxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
10/24/2003 09:30 AM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Benefits of Sub-procedures






Hey, maybe have the precompiler search for BEGSR's and kill the compile? 

Rob, it's not that I'd never RETURN from within a subroutine.  It's just 
that I'd
never tolerate a one-statement subroutine.  Never.  Don't even go there. 

GA

--- rob@xxxxxxxxx wrote:
> 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


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
_______________________________________________
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.