Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing parameter by reference
Message
From
07/09/2011 16:23:23
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
07/09/2011 16:19:33
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01522925
Message ID:
01522935
Views:
84
>>>Does anyone know of a way to determine if a variable has been passed to a function by reference or by value. This is a run-time question.
>>>For example:
>>>
>>>local a
>>>a='test'
>>>=Test(@a)
>>>=Test(a)
>>>
>>>procedure Text
>>>lparameter b
>>>*-- here, i would like to verify that the variable 'a' was passed to 'b' as by reference.
>>>...
>>>
>>
>>Take a look at this
>>http://berezniker.com/content/pages/visual-foxpro/difference-between-function-and-procedure-statements
>
>Does that answer the question ?

IMO, it does not - it's the full list of how passing parameters in Fox works, from the caller's side. What we need here is the callee side, where I don't know of a way to distinguish between a passed value and a passed reference. Either way, the callee receives a pointer to a memory block where the value resides; it's the actual status of the value (is it a pointer to the same location where the value of a passed variable resides, or to a copy of a value that is assigned to a parameter) that I don't see how to distinguish, without knowing Fox source code.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform