[Scilab-users] How to overload "double" function ?
philippe
rouxph.22 at gmail.com
Wed Aug 22 12:44:49 CEST 2018
Hi Samuel,
Le 22/08/2018 à 11:12, Samuel Gougeon a écrit :
>
> The overloading mechanism is not systematic. It is implemented (or not)
> function per function.
> It is currently proposed for some of them, but not all of them.
> If you need it for double(), you shall post a wish on Bugzilla.
Thanks Samuel! In fact, I've already overloaded iconvert but I did not
remembered it! Since the error message refers to "double" it is not easy
to remember the correct way for overloading.
>
> PS: for instance, iconvert(p,0) makes the same as double(), and is
> overloadable:
That's the problem : it was true in scilab-5 but iconvert seems no
longer overload double in scilab-6. See below :
--> function y=%p_iconvert(x,itype)
> y="OK"
> endfunction
--> X=poly(0,"x")
X =
x
--> double(X)
double : Types erronés des arguments d'entrée : entiers, booléens ou
réels attendus.
--> iconvert(X,0)
ans =
OK
Sincerely yours,
Philippe
More information about the users
mailing list