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



On Thu, 13 Jan 2005 12:32:46 -0500, Jon Paris <Jon.Paris@xxxxxxxxxxxxxx> wrote:
> >> It is interesting to me however because it invalidates my assumption of
> how the compiler passes parameters.
> 
> Chances are (based on my knowledge of the OPM compilers) that any variables
> used as parms have a pre-initialized pointer variable associated with them.
> Hence no need to evaluate and assign the address - it is already known.  The
> compiler simply passes the associated pointer.

But every variable is based on a pointer.  A static variable is based
on the pointer to static storage and a variable in a procedure is
based on the pointer to the call stack entry of that procedure.

> 
> Remember - we're not dealing with a C type scenario where few addresses are
> known at compile time.  Unless the variable is based or received as a
> parameter, the RPG compiler knows exactly where it will be in memory.

As much as I would like to argue with you Jon, I cant because I dont
know the facts. :)

One other factoid on this subject ....  setting a native pointer on
the as400, that is the 16 byte, full of capabilities pointer, is
actually a relatively slow performer compared to pointer operations on
other systems.  Setting a PASE pointer for instance.  So I was sure
passing by reference would be slower than passing by value.  But I was
wrong. Go figure.

-Steve

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.