[Scilab-users] The overloading code for functions is changed in Scilab 6

Clément David clement.david at scilab-enterprises.com
Mon Dec 19 10:40:44 CET 2016


Hi Samuel,

This change is probably not intentional, could you post a bug on that please ?

PS: even if the type "mc" as been clarified as "function", we can add a compatibility mode for
overloading aliases.

--
Clément

Le lundi 19 décembre 2016 à 08:41 +0100, Samuel Gougeon a écrit :
> Hello all,
> 
> It seems that the overloading code ascribed to the Scilab function type is not the same in Scilab
> 6 than in Scilab 5:
> 
> in Scilab 5:
> [sind sind]
> function %mc_c_mc(a,b), disp("code is mc"), endfunction
> [sind sind]
> 
> -->[sind sind]
>         !--error 144 
> Undefined operation for the given operands.
> check or define function %mc_c_mc for overloading.
>  
> -->function %mc_c_mc(a,b), disp("code is ""mc"""), endfunction
>  
> -->[sind sind]
>  code is ""mc""   
>   
> in Scilab 6:
> --> [sind sind]
> 
> Undefined operation for the given operands.
> check or define function %function_c_function for overloading.
> 
> --> function %mc_c_mc(a,b), disp("code is mc"), endfunction
> 
> --> [sind sind]    // mc does not work. This is not just a bad error message:
> 
> Undefined operation for the given operands.
> check or define function %function_c_function for overloading.
> 
> --> function %function_c_function(a,b), disp("code is ""function"""), endfunction
> 
> --> [sind sind]
> 
>  code is "function"
>  ans  =
>     []
> 
> I have not tested all operators, but at least this is also the case for the vertical concatenation
> [;].
> It this change intentional? It is not documented.
> 
> I am wondering why -- if back-compatibility is not an issue -- other changes more expected are not
> done for Scilab 6 as well?
> 
> Best regards
> Samuel Gougeon
> 
>  _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users



More information about the users mailing list