>>>>No risk at all since I'm using lparameters and not passing variable by reference.
>>>
>>>Ah, but, as far as I know, objects are
always passed by reference, because the object type variables
are references to actual objects. So if you pass an object by value, you do get a new variable, which still refers to the same object.
>>>
>>>If it wasn't so, your changes to the object would be lost as soon as your code exits - but you know your code works.
>>
>>Dragan, I think you're mixing us up here. If SET UDFPARMS is set to VALUE and a variable holding an object reference is sent as a parameter in a normal way, then that variable cannot be changed in the called function/procedure/method. If the setting is REFERENCE, then the variable can be changed. I think your usage of 'passed by reference' obfuscates things here.
>
>This is true for any variable - but what is a content of an object reference variable? The reference to an object. And even if you have a copy of such a variable (i.e. passed by value), it only increases the reference count in the object, it doesn't create a copy of the object. So, substantially, an object passed as a parameter is always passed by reference. Or, more precisely, it's passed as a reference.
>
>You can check this yourself - pass thisform by value to any piece of code which will change its caption and see what happens.
Pass thisform by reference, change its value and see what happens when you use it. See
Re: Find a flaw in the logic Thread #
1086027 Message #
1086509
Groet,
Peter de Valença
Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.