[Scilab-users] Passing function argument by reference

Grzegorz Skiba skiba.g at gmail.com
Mon Jul 2 15:24:42 CEST 2018


Dear Scilabers,

Is it possible to pass object (tlist) to a function by a reference ?

Example code :

function ref_test(obj)
    obj.a = 10; endfunction
o = tlist(["tlisttype", "a", "b"], 0, 0);
ref_test(o)
if o.a == 10 then
    disp("works");else
    disp("do not works");end


Regards Grzegorz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20180702/fc47d35a/attachment.htm>


More information about the users mailing list