|
| -----Original Message----- | [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Buck | | Hi Carel! Great question! In my quick typing, I hadn't thought | to include | the details: sorry. There are a few details you've yet to consider, Buck. | 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) Nice touch! :-D | -----Original Message----- | [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Buck | > Hey Buck, | > | > Nice little excercise here. mind if I chip in? | | Jump in, the water is fine! This is exactly the point of a | public forum; to | discuss ideas amicably... I hadn't noticed. When you get flamed nearly as much as I have today, then come back and we can compare points, Buck. | | > Just MHO, but this is not exactly what procedure | > overloading is for. These are very specific examples. | | Yes you are quite right! I just dreamt up a quick 'what if'. I say | 'dreamt' because I can't do this today in RPG. | | > monthName = getMonthName( myDate ); | > monthName = getMonthName( myTimestamp ); | | Much clearer than mine. I am NOT fluent in other (overload-capable) | languages, and it's good to see posts from others on this topic. | Which has | drifted considerably from the original subject! :-) Yeah, a bit. So what? Let me get this right: You believe that 1) name=getName(object, whatEverKey) is SIGNIFICANTLY BETTER than: 2) name=getName("Vendor", whatEverKey) 3) name=getVendorName(VendorKey) When 2 and 3 are available as of a few releases ago?? PLEASE don't try to convince me #1 is easier, and saves time and money, unless you wanna debate the article I referred to. I never said you couldn't TRY REAL HARD to make up a use for procedure overloading, Buck. That's entirely different than making a business case for the so-called NECESSITY, for business apps. As far as the monthName example, it would be easy enough to pass the parm as numeric data, and compare the length. Can do that as of a few releases ago, also. The question, and how this constitutes discussion on THIS topic: How's about an editor that is as good as Word 3.0, before we go for procedure overloading???
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.