|
Bill, You're right, that's how I would do it. The GetCustName would execute either GetCustByNumber or GetCustByName. That is implied (at least to me). Thanks for pointing that out. Brad > -----Original Message----- > From: bill.reger@convergys.com [mailto:bill.reger@convergys.com] > Sent: Wednesday, May 09, 2001 9:44 AM > To: RPG400-L@midrange.com > Subject: RE: Overloading in RPG. > > > > I have been following this "overloading" thread and find that > I am a bit > ambivalent about whether I think this is a good thing or not. > > On the one hand, I have always disliked modules that > performed different > logic based on input parameters. To me this is a module in > need of some > further splitting up into more modules. A module that does > two things can > easily be split into two modules, with a third module that > executes one or > the other of them. Using Brad's "GetCustAddress" example, we > could instead > build: > > "GetCustAdrByCust#" > "GetCustAdrByLName" > > and finally > > "GetCustAddress" (executes one or the other of the other two > modules) > > I have always argued that this level of decomposition gives > the programmer > the same freedom to use "GetCustAddress" but also allows them > to use the > sub-modules when requirements dictate. > > On the other hand, if RPG had "overloading", then I would not > have to build > the third module since the RPG compiler would handle the function of > determining which of the first two modules I wish to execute. > > Bill > > > -- > > NOTICE: The information contained in this electronic mail > transmission is > intended by Convergys Corporation for the use of the named > individual or > entity to which it is directed and may contain information that is > privileged or otherwise confidential. If you have received > this electronic > mail transmission in error, please delete it from your system without > copying or forwarding it, and notify the sender of the error > by reply email > or by telephone (collect), so that the sender's address records can be > corrected. > > > +--- > | This is the RPG/400 Mailing List! > | To submit a new message, send your mail to RPG400-L@midrange.com. > | To subscribe to this list send email to RPG400-L-SUB@midrange.com. > | To unsubscribe from this list send email to > RPG400-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: > david@midrange.com > +--- > +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.