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



I think I got it, thank you Jon.


"Jon Paris" <jon.paris@xxxxxxxxxxxxxx> wrote in message
news:mailman.39962.1279807641.2580.rpg400-l@xxxxxxxxxxxxxxx
I'm not Simon - but he's probably asleep right now so ...

In the third case you must pass a pointer as the parm - what will
actually get passed to the called routine is a pointer to that pointer.
Rarely what you want.

In the second an actual pointer will be passed.

The first is the same as the third but with the added option of using
%Addr as the parameter and (assuming the same proto is used in the called
routine) the called routine will not be able to modify the pointed-to
pointer.

What I think Simon was trying to point out is that in a bound call,
passing a pointer by value results in the same thing from the callee's
perspective as passing a field by reference.

i.e. From the callee's point of view this:

callb xyz( %Addr(myVar) ); where the proto specifies a pointer by value
is identical in effect to:

callb xyz( myVar ); where the proto simply specifies a non-pointer
variable.

Write a simple piece of code and see for your self. In both cases the
callee is passed a pointer to the data in myVar.


Jon Paris

www.Partner400.com
www.SystemiDeveloper.com



On Jul 22, 2010, at 9:30 AM, rpg400-l-request@xxxxxxxxxxxx wrote:

Hey Simon,
care to explain a bit more about the different between these three
prototype?
D proc1 pr
D data * const


D proc1 pr
D data * value


D proc1 pr
D data *




As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.