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

Stefan Du Rietz sdr at durietz.se
Mon Jul 7 09:37:01 CEST 2014


Hello,

Why not ordinary function files?

exec("fun1.sci")
exec("fun2.sci")

And then rename them when needed:

f = fun1;
...
f= fun2;
...

Regards
Stefan


On 2014-07-07 00:16, Alain LAMY wrote:
--------------------
> Hi,
>
> Here's another suggestion, in case:
>
> Say that function f(x) is defined in the file "file1.sce".
> and that f(x) is also defined in "file2.sce".
>
> If you load the functions:
> exec("file1.sce")
> f1 = f;
> exec("file2.sce")
> f2 = f;
>
> then you have the 2 functions in memory with different names.
> You could then rename them as required: f = f2; ...
>
> You could also store the functions in a list, or use execstr
> to manage function names: execstr("f"+str+"=f");
>
> I hope that helps.
>
>
>
>
>
> --
> View this message in context: http://mailinglists.scilab.org/Scilab-users-Multiple-files-of-functions-with-the-same-name-tp4030814p4030832.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>




More information about the users mailing list