× 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 see your point, but I can understand the frame of reference that the 
other people have also.  If I had to pick my battles, I'd surrender this 
one (and use unlimited weapons of mass destruction on the bugger who 
converted the IF statement).

And Jon, I agree with your point, and that this debate is tangential to 
that point.  That point being that if someone creates a subprocedure to do 
something
resultfield = mysubproc(parm1: parm2:  ...);
and that the subprocedure is tried and true, then we have no business 
looking at that code.

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




Dan <dbcerpg@yahoo.com>
Sent by: rpg400-l-bounces@midrange.com
02/12/2003 02:31 PM
Please respond to RPG programming on the AS400 / iSeries
 
        To:     RPG programming on the AS400 / iSeries 
<rpg400-l@midrange.com>
        cc: 
        Fax to: 
        Subject:        Re: "If %scan(x:y)" is not valid???


Well, I "disclaimerd" anything more than one statement! <g>

Frankly, the one-statement subroutines I've seen will always only be one 
statement.  Of the
hundred or so subroutines I've seen in my career that only do a SETON LR, 
I've never seen them
changed to do more than that.

Why presuppose that the possibility exists someday that there will be more 
to a "function" than
the one or two statements that the "function" needs now?  If it does 
happen, that would be the
time to separate the function into its own subroutine / subproc.
 
Really, we could take this to the extreme and say that every line of code 
is a potential function
in and of itself that could grow.  So why not avoid the inevitable and 
give every line of code its
own subroutine / subproc?

- Dan

--- rob@dekko.com wrote:
> The problem is that the subprocedure/subroutine often grows.  And, since 

> you started it right in the first place, it grows right.
> 
> For example, I was once questioned on this list why I would do
> C/Exec SQL
> C...
> C/End-Exec
>  /free
>   // one line of code
>  /end-free
> C/Exec SQL
> C...
> C/End-Exec
> 
> But once I explained that how do you make a decision that the line has 
now 
> exceeded a predetermined minimum number of lines needed to justify 
> converting to free form?  Especially when people are loath to change 
code 
> that is working.  But if you start out right...
> 
> Rob Berendt


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
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.