[Scilab-users] Getting the variable name used for a function input argument

Samuel Gougeon sgougeon at free.fr
Wed Nov 24 18:07:40 CET 2021


Le 24/11/2021 à 09:51, Stéphane Mottelet a écrit :
>
> Hi,
>
> Le 24/11/2021 à 01:42, Federico Miyara a écrit :
>>
>> I'm not completely sure, but I think this is not possible since what 
>> is passed to the function isn't a variable but the value contained in 
>> the variable.
> No. Internally, input arguments are passed as references to the true 
> object. There is no copy /unless an input argument *is modified*/ in 
> the function (in that case a copy with local scope only).


Are you sure about that? Not when they are only reached in read mode?

I might have misunderstood, but i remember a discussion with Clément 
during the last ScilabTech. Clément was categorically stating that all 
input arguments are copied, only and always copied.

Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20211124/e9b85c0a/attachment.htm>


More information about the users mailing list