|
Lately a question has been floating through my mind: "Can RPGLE be used in a way simulate object oriented programing?" For example, can a service program act as an object and it's procedures be methods? In OO programming you don't pass parms all the time. You call methods to "set" or "get" values. That is the "public interface". So you can add methods to the object without affecting the public that is using it. As opposed to using parms where if you add a new parm you change the public interface and have to recompile calling programs even if they don't use the new parms. One problem is that procedure names cannot be qualified by service program (I don't think). So if you used two service programs that contained the same procedure name, rpg would be confused. For example, let's say you had 2 objects: UpdCustRec and UpdItemRec. And they both had a method "SetStatus". In an OO language you would code: UpdCustRec.SetStatus('A') and UpdItemRec.SetStatus('A') . Can you simulate this in rpgLE? Sorry for being so long winded. Any comments out there? +--- | 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.