× 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.



Bartell, Aaron L. (TC) wrote:
> I was surprised that there wasn't a vote spot for qualifying sub procedures.
> As RPG moves more towards a PC/OO language all the time, and with the use of
> ILE on the rise I think that would be a top priority.
>
> Here is an example of what I am talking about:
> Let's say I have two modules -- CUSTOMER and ITEM.  Within both of them I
> have a sub procedure named getDescription.
>
> Currently I have to code my programs like the following if I want to use
> both of those sub procedures:
>
> eval    custDescription = getCustDesc(1234)
> eval    itemDescription = getItemDesc('HAT')
>
> I would like to be able to do this:
>
> eval custDescription = CUSTOMER.getDescription(1234)
> eval itemDescription = ITEM.getDescription('HAT')
>
> Does anybody else see a great benefit to this or am I the only one.  I have
> included this request on the bottom of my ballot.  What are the chances of
> personal requests getting into the language this next round?

This is a good idea, not because it *might* get us a little bit of
the way towards OO (which I don't think is a good idea for RPG,
BTW), but because of the issue of name-space collision, as
demonstrated by your example.

However, the items on the ballot are things that we have a good idea
of how to implement.  Qualified procedures doesn't quite fit into
that category.

BTW, if you do want to do something sort of approximating OO in RPG,
look at what you can do with procedure pointers.

Cheers!  Hans





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.