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



Barbara,

As I understand it, if the variable passed has the same length/type as the
parameter definition, the address of the variable is passed directly; if it
has a different type or length, it's copied into a temporary variable, whose
address is passed to the procedure.

If oneIn the second case, I assume that if the called procedure *were* to
change the parameter, since it would only affect the temporary variable, it
wouldn't be a problem, whereas in the first case, it *could* affect the
variable in the calling program. Is this correct?

A low-level question then: In the second case (using a temporary variable),
is the storage for that variable freed immediately after the procedure has
returned control or what?

Rory

On Thu, Jul 22, 2010 at 7:22 AM, Barbara Morris <bmorris@xxxxxxxxxx> wrote:

* const: a pointer passed by reference. The called procedure is not
expected to change the parameter. Coding CONST is a promise from the
RPG programmer to the RPG compiler that the called procedure will not
change the parameter. If the called procedure is an RPG procedure, the
RPG compiler will enforce this.


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.