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




James,

If you want to continue to pass by REFERENCE, but want to pass constants, then add the CONST keyword to each parameter on the prototype that shoudl accept constant values. CONST basically means "this parameter is input only" and therefore it's suddenly legal to pass parameters that aren't allowed to change (such as constants)

If, instead of passing by reference, you'd prefer to pass by VALUE then you need to replace the *ENTRY PLIST with a procedure interface (PI). The only reason is that IBM stopped enhancing *ENTRY PLIST. When they added the ability to pass by value, they only added it to the newer method of making calls -- which is PR/PI.

But, if all you want to do is pass by reference, you can keep using the old method if it's easier.

---
Scott Klement  http://www.scottklement.com

On Wed, 7 Jun 2006, James H H Lampert wrote:

Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx> wrote:

There's really not much to it.   Just make a prototype
that matches the *ENTRY PLIST.

Dear Scott:

Thanks for taking pity on my confused, tortured, little
grey cells.

That's actually the first thing I tried. The compiler
didn't like the fact that I was passing constants. I tried
adding VALUE to the parameter entries on the prototype; it
compiled and linked fine, and even picked up the binding
directory the called module was asking for (for stuff IT
had to bind to) without having to specify it again in the
entry-point module,

BUT

as soon as I tried to execute it, it complained because of
what appeared to be a pass-by-value/pass-by-reference
mismatch that evidently wasn't fixed in the binding
process.

What do I need to do, to have the called module accept
call-by-value? Or, alternately, is there a way to pass
literals and/or named constants by reference?

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

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.