Hi all,

I am encountering some difficulties with overloading in Scilab 6, and I'm wondering if this is a bug or not.

Consider the following example,

a = mlist(['mytype']);
b = mlist(['myothertype']);
function out = %mytype_e(varargin)
   var   = varargin($);
   field = varargin(1);
   disp(typeof(field))
   out = [];
endfunction
a(b);

It defines two objects 'a' and 'b' of types 'mytype' and 'myothertype'. The extraction is overloaded for 'mytype' and displays the type of the field that is meant to be extracted.
At the end, I try to extract 'b' from 'a'.

In Scilab 5.5, 'b' is actually passed to the overloading function and 'myothertype' is displayed by 'a(b)'. Scilab 6 behaves differently and 'field' in the overloading function is a string equal to 'myothertype'.


Best regards,

Pierre
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to