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



*UDTs* It will be nice if RPG could use the User_defined Data Types. This way you can have the compiler check and warn you if you try to compare the customer number with the item number, or if you try to compare Dolar and Guaranies.

Buck wrote:

Carel wrote:



Just some thoughts on this:

How are you certain that this (overloaded) procedure
getName will return the correct name? If two procedures
expect a numeric value and you pass a numeric value,
will the first procedure not accept the "call" and return
its found name? the similar problem applies to character
values. Just wondering.



Hi Carel! Great question! In my quick typing, I hadn't thought to include the details: sorry. I would expect the compiler to match the parameter size and type to locate the proper procedure. So, the getName in the vendor service program expects a 5/0 number, the getName in the G/L module expects a 12/0 number and the getName procedure in the Inventory module expects a 10 character parameter. I hope that helps explain what I was thinking about.

And yes, I realise that it is very possible that ther would STILL be a
problem if the Customer number, Item number and Vendor numbers were all
numeric 5/0.  How would the overloading work then?  It wouldn't.  But I was
just trying to show that the concept of overloading procedures actually can
apply to real world business needs, and is not just a topic for lectures at
university.

Groetjes!  (I hope I got that right)
 --buck



_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




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.