[Scilab-Dev] problem with function overloading

Samuel Gougeon Samuel.Gougeon at univ-lemans.fr
Wed Mar 10 15:36:00 CET 2010


----- Message d'origine -----
De : StŽéphane Mottelet
Date : 10/03/2010 15:22:
> I already know this trick; the problem is that it it does not work 
> with overloading functions, that
> is what I was explaining in the bug report.
> I fully understand that overloading is not aimed to redefine, but this 
> is the only solution for me
> to emulate new properties for graphic objects (in the Plotlib). 
So do it as i have done it for max(). You just have to write a clean wrapper
for properly transfering support of default cases, and then extend it 
with your
own code for additionnal cases.
> I use the user_data field.
> You will sayt that I could have directly used a tlist, and overload 
> set and get, but the big problem in Scilab is
> that tlists are not passed by reference in macros, although graphic 
> handles are...
>
> So, I need to modify %h_set and %h_get. The problem is that they do 
> not seem to be
> overwritable; 
Yes they are. See my previous post.

Samuel




More information about the dev mailing list