[Scilab-users] Dot operator on a handle

Samuel Gougeon sgougeon at free.fr
Sun Sep 29 14:54:06 CEST 2013


Le 29/09/2013 11:37, Stefan Du Rietz a écrit :
> Error setting a property of a graphics entity with the dot operator on 
> a handle from a calling function
.
with

function  testhandle2(set_a_is_a,a)
   if  set_a_is_a
     a  =  a
   end
   disp("typeof(a) ="  +  string(typeof(a)))
   set(a,"user_data",2);
   disp("typeof(a) ="  +  string(typeof(a)))
   a.user_data  =  3;
   disp("typeof(a) ="  +  string(typeof(a)))
   delete(f)
endfunction

we get

-->testhandle(%t)
  typeof(a) = handle
  typeof(a) = handle
  typeof(a) = handle

-->testhandle(%f)
  typeof(a) = handle
  typeof(a) = handle
  typeof(a) = st

Indeed, it is a very weird behavior.

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


More information about the users mailing list