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



Isn't that what Barbara was suggesting?

Just like the way CONST works now, the compiler generates code to convert the data to whatever is specified on the prototype. The only diff between this and the existing CONST support is that it'd be roundtrip -- i.e. not just converted on input, but converted on output as well.

But it'd still be converted automatically by determining the type needed.

Obviously there'd have to be SOME SORT of keyword on the prototype itself, otherwise you'd break backward compatibility. But I don't think she was suggesting that it require you to specify the from/to variable types.


Mark Murphy/STAR BASE Consulting Inc. wrote:
And if this were all automatic, no special keywords necessary, the compiler just determines the type needed based on the parameters passed on the call, that would be even better.

Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx

-----rpg400-l-bounces@xxxxxxxxxxxx wrote: -----

To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
From: Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
Date: 01/13/2010 02:14PM
Subject: Re: RPG overloading (was RPGV?)

That would definitely work better than overloading in this case!

Barbara Morris wrote:
What would solve this problem would be a new style of pass-by-reference parameter, where the compiler would create a temporary of the type required by the prototype. It would assign the passed parameter to the temporary before the call, pass the temporary to the procedure, and then assign the temporary back to the passed parameter after the call.



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.