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



Hmmm - for one thing, if you pass a pointer, you are passing an address to something. If you use CONST, you are saying you don't want the POINTER changed. But whatever is at that address can be changed. Besides which, you don't know what kind of thing it is - is it packed, is it character, is it an integer? You and the called program have to have a prior agreement, a contract, if you will.

Vern

On 7/22/2010 3:57 PM, hockchai Lim wrote:
I was ok. But now I'm confused again :)...

"Barbara Morris"<bmorris@xxxxxxxxxx> wrote in message
news:mailman.40099.1279829995.2580.rpg400-l@xxxxxxxxxxxxxxx
BMay@xxxxxxxxx wrote:
Barbara,

Perhaps I'm wrong, but your second example doesn't make sense to me.

"* value: a pointer passed by value. If the called procedure changes the
parameter, the caller will not see the change."

I always thought that this would mean the calling program would not see a
change to the actual POINTER. However, if the value in memory that the
pointer is pointing to changed, that would be reflected in the calling
program.

Brian, you're right about the data the pointer is pointing to.

But in this case, the parameter _is_ a pointer. I wasn't talking about
what the pointer is pointing to, I was talking about the pointer itself.

(That's what I meant about it's being difficult to understand the
difference between the parameter-passing modes when talking about pointer
parameters. When you have the "pointer" concept being used for the
mechanism of passing the parameter _and_ for the parameter type itself, it
can be confusing.)


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.