|
Some people would argue that overloading is syntactic sugar. I'm neutral. Generally overloading is used to do something that is different in detail, not totally different. The most common example of overloading would be to accomodate default arguments without having to account for their being missing. The const keyword allows a limited kind of overloading because it allows implicit type casting of parameters. Arithmetic operators in RPG and most other languages are overloaded. The plus sign is overloaded to add numbers of different types, and now also can be used for string concatenation. In C++ you can overload operators and the only limit to what you can do is your conscience. The potential for confusion is limitless. > -----Original Message----- > From: York, Albert [mailto:albert.york@nissan-usa.com] > Sent: Tuesday, May 08, 2001 3:44 PM > To: 'RPG400-L@midrange.com' > Subject: RE: Overloading in RPG. > > > I may be showing my ignorance, but why would you want to have > two entirely > different subprocedures with the same name? It seems like it > would be very > confusing to me. > > Albert York > +--- | 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.