|
On 8/10/07, albartell <albartell@xxxxxxxxx> wrote:
justthe goto is seen by everyone as bad practice. but the subroutine is
as bad.that? Subroutines
Oh c'mon Steve, why did you go and make a comment like
are VERY useful in modularizing code internal to a program. Justbecause
you can't have local variables doesn't put it into the same bucket as
GOTO's.
I had to work on legacy cobol and rpg code last year and it was a time
killing process. the cobol was impossible with all of its redefines
of the data. But the RPG was very hard to work with also. the rpg I
got a handle on by reworking the subroutines as procedures and
eliminating all the global effects of the routines. For me,
complexity is just an accumulation of details and indirection. Simply
looking at a procedure and being able to tell that a variable is
passed as input from the caller is one level of indirection less than
an RPG subroutine.
-Steve
--
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 mailing list archive is Copyright 1997-2025 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.