[Scilab-users] global constant definition for module

Serge Steer Serge.Steer at inria.fr
Wed Mar 2 19:06:19 CET 2016


In the past, it was possible to store variables in scilab libraries 
(lib) just saving them with the .bin extension and adding their names in 
the names file and so to do what you want.
example
dirpath=TMPDIR+"/test/";
mkdir(dirpath);
A=rand(5,5);
P=%s^2+1;
save( dirpath+"A.bin","A");
save( dirpath+"P.bin","P");
mputl(["A","P"],dirpath+"names");
testlib=lib(dirpath)
clear A P
//Up to this point every thing goes well

but with  5.5.2
A
return the error :Overloaded load cannot occur in this context

And I do not know if it is possible with Scilab6 because the bin files 
are no more "save" files.

I think it should be useful to make it work again....
Serge


Le 02/03/2016 12:24, David Chèze a écrit :
> Hi all,
>
> I would like to define a variable in a user module in such a way that this
> constant would be available for all functions (also out of the module) as a
> "hidden(you don't need to see it inbrowsvar), protected (should not be
> possible to clear it, even with clearglobal )" global variable as soon the
> module is loaded: do you have suggestions how to do it within scilab?
>
> David
>
>
>
> --
> View this message in context: http://mailinglists.scilab.org/global-constant-definition-for-module-tp4033598.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