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



John,

It would be nice if we could qualify a procedure name with a module or
service program name similar to the way we qualify a field name in a data
structure.  Then you could code getLastPeriod() in the CUTLS001
module/service program.  If you had no name conflict between modules you
could use getLastPeriod() in the programs without a problem.  But if a name
conflict occurred you could qualify, in the RPG program, to the right
procedure with CUGLS001.getLastPeriod() to get around the name conflict.

This doesn't tackle your immediate problem but would be a solution for a
future release.  Also, this is getting close to Object RPG.  Instead of
qualifying the procedure to a module/service program if you could qualify it
to a data structure you'd have an object (like C++ objects are just C
structures enhanced with methods and scoping).  For example, you could do
CurrentCompany.getLastPeriod();

Just a thought,
Paul

-- 
Paul Morgan
Senior Programmer Analyst - Retail
J. Jill Group
100 Birch Pond Drive, PO Box 2009
Tilton, NH 03276-2009
Phone: (603) 266-2117
Fax:   (603) 266-2333

"John Taylor" wrote

> I've thought about using procedure pointers to create a shorter alias name
> within the consuming source member. This would allow me to keep the
> "CUGLS001" prefix in the main service program, and simply drop it in those
> 99% of situations where "getLastPeriod()" itself would not create a naming
> conflict.
>
> Unfortunately, RPG doesn't offer us a "LikePrototype" keyword, so I then
end
> up having to maintain multiple versions of the same procedure prototype;
one
> for the service program proper, and another for each aliased procedure
name.
> Yuck.
>
> I'm now looking for fresh ideas. What are the rest of you doing to tackle
> this problem?




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.