×
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.
From: Neill Harper
So why isn't there a demand for OO RPG, I want it ;-)
I would REALLY prefer that IBM NOT make RPG a fully OO Language! Procedural interfaces are better for a business oriented language, IMHO.
Notwithstanding the foregoing, Barbara Morris shared a little technique a number of years ago, which I've used extensively. OO languages generally use the "new" keyword to instantiate new objects, which encapsulate properties and methods. As an alternative, consider doing something like the following in RPG:
myPointer = myObjectNew();
Where myObjectNew() creates a new instance of a data structure, using %alloc(), and returns a pointer to it. That data structure represents a new instance of your object. All other procedures in the service program reference a particular instance of that data structure via "myPointer".
For "inheritance" purposes, consider writing service programs which are essentially wrappers around other service programs, but provide successively higher levels of abstraction.
Forget "polymorphism", it's not worth it.
Just suggestions,
-Nathan.
As an Amazon Associate we earn from qualifying purchases.
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.