Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I pass an object property by reference?
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00480283
Message ID:
00480480
Views:
13
Stephane,

>God bless you George. The precise answers you've given me over time have always been precise and precious. Thank you very much for your time.

You're quite welcome and thanks for the kind wishes.

>Now, I don't know about you, but I find that not being able to pass object properties by reference directly in VFP is ridiculous! This is the first time I've encountered such a thing. Why haven't the programmers at MS thought of this issue. Is this done on purpose or is it a not-so-common thing that nobody uses? Even so, I think it would be very useful to allow parameters being passed by reference in every possible way.
>

Given the circumstances, I'd have to agree with Erik on this. A couple of things of note: First, objects are always passed by reference. Second, there would be a couple of issues that would make this a pretty daunting proposition. This may not be entirely accurate given I don't know the precise working internals here, but think of the "dot" in Object.Property as a pointer to the property. Now if you were allow to use a syntax such as MyFunc(@.Property) you'd be passing a pointer to a pointer. Such a simple matter as providing what the type is to the incoming function then gets very complicated.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform