Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning an Array from a Function
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00338850
Message ID:
00340026
Views:
33
>>>I don't think you do. There are languages that permit you to pass an object by value; this means that the receiving function/method gets the address of a copy of the object, as opposed to the address of the copy of an object pointer value. The object passed by value in this case would have a lifespan of the parameter's validity, as opposed to an object reference passed by value as is the case with VFP pass by value, as opposed to the address of the object pointer, the case of VFP's pass by reference. And you absolutely need to understand this difference, since it's an important concept for little unimportant issues like COM!
>>
>>Ed, that is a very unclear way of explaining something. Normally, showing different cases and the details of that case would be more effective. Regardless, why even talk about passing by value when it isn't done in VFP with objects? You either pass a pointer, or a pointer to a pointer. Right?
>>
>
>Let's examine this in the context of COM marshalling. What is actually passed to a remote server, and what behavior occurs when the value passed to the method is passed by reference vs passed by value? Because of marshalling, the "pointer" is never passed directly, is it?

Heck Ed, you ignored my question. Not a very efficient way to communicate. Why expand the conversation? We weren't talking about passing values.

I am not familiar with the term of marshalling. I might be familiar with the concept. Good thing I am not going to be tested on this. But why expand on what was said? This was a very simple point two or three messages ago that you've avoided addressing.

>
>>Anyways, this is not the original point. You said "To actually pass an object by value, you'd have to create a copy of the object in the calling code and destroy the created object copy on return." If you are creating the copy and then working with that copy, you are not really passing by value. You are passing by reference to the COPY. So sure, you can manipulate and change the COPY without changing the original object. But you are only simulating passing the original by value, you are not actually doing it. But your meaning is understood.
>
>Answer the following. If I pass a char memvar by reference, what is passed? If I pass a char memvar by value, what is passed? Realize that the recieving code doesn't know, and doesn't care, if a byref or byval occurred. It receives the same thing in both cases, a parameter of unspecified type and context...

If you have something to say Ed, why don't you say it? Memory pointers are passed. But what is your point?

Ed, in contrast to you, I don't enjoy expanding topics to the point where the focus isn't clear. The focus in VFP is cause and effect. If I wanted to be concerned with low-level activity, I would still be do most of my developing in C++. In VFP, what is important is "If I do this, this will happen; but if I do this, this other thing will happen."

So if you are flipping through your text books and manuals digging up trivial information on what is happening low level, why don't you just divulge what you've found in an efficient manner instead of asking questions? In other words, spit it out.
Joseph C. Kempel
Systems Analyst/Programmer
JNC
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform