[Scilab-users] Multiple files of functions with the same name

Samuel Gougeon sgougeon at free.fr
Thu Jul 3 09:23:35 CEST 2014


Le 03/07/2014 09:14, Samuel Gougeon a écrit :
>
> Let say that you have 2 functions written in Scilab language, with the 
> same name "fun(..)" and same or distinct profiles (possible calling 
> sequences). If each one is declared in a specific library -- say lib1 
> and lib2 --, then you can call each one separately: lib1.fun(...) will 
> call the first implementation, and lib2.fun(..) the second one ; etc. 
> I think -- but this must be checked -- that after calling 
> lib1.fun(..), this implementation will be loaded in memory, replacing 
> any other previous loaded implementation of fun(..). So, if then you 
> call simply fun(..), still the lib1 implementation will be run.
May i add that if you wish to make actual all the functions of a scilab 
library, just load the library. This will replace in memory all previous 
functions with identical names.

Samuel




More information about the users mailing list