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



Yes, of course I would define multiple procedures, but that complexity
would be hidden to the procedure user.

And as I said, returning a date and manually splitting made the
procedure useless, one might as well use directly the original date
field.

But I'm not lamenting, I'm just kinda *sighing*.

--
Saludos
Antonio Salazar

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Tuesday, January 12, 2010 2:07 PM
To: RPG programming on the IBM i / System i
Subject: Re: RPG overloading (was RPGV?)

...but overloading won't solve that problem. You'll still need one
procedure for every combination.

All that it changes is that those procedures can all have the same name,

instead of having to have a separate name for each one. You still have
to write just as many procedures.

Why don't you just return a date field, and use %subdt() to break it
into it's compontents?

YY = %subdt(splitDate(whatever): *YEARS);
MM = %subdt(splitDate(whatever): *MONTHS);
DD = %subdt(splitDate(whatever): *DAYS);

That's a lot easier than trying to solve this problem using overloading.

Believe me.

Jose Antonio Salazar Montenegro wrote:
Roger, the problem is that our date fields are stored YY, MM DD
components with packed/zoned/integer and binary types. To modify
parameters by reference I'd need one procedure for each combination.

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.