[Scilab-users] Context error in Xcos Scilab 6.1.0

Samuel Gougeon sgougeon at free.fr
Tue Mar 3 13:57:17 CET 2020


Le 02/03/2020 à 10:17, Clément David a écrit :
> Hello Pierre, Samuel,
>
> First, did you opened a bug on that issue?
>
> Second, to me, the bug is located on the script2var() function which resolves the context and output a struct of `variable=value` that are defined for the diagram (and its parents). For example, when I explicitly define A=100 in the context, the A variable is found and resolved as 100 in the diagram. However, defining A=50 inside the A.ctx file and using the schema A610.zcos, where the A.ctx file is passed to exec(), failed.


Thanks Clément for the indication and the report 
<http://bugzilla.scilab.org/show_bug.cgi?id=16357>.

Pierre,
A solution is available => there 
<https://codereview.scilab.org/cat/21429%2C2%2Cscilab/modules/scicos/macros/scicos_scicos/script2var.sci>.
How to install it:

  * Download and unzip the file. Rename it script2var.sci

  * Put script2var.sci in its SCI/scicos/macros/scicos_scicos directory

  * Run the following Scilab code in the console, /with some full
    read/write rights/:
    cd SCI/scicos/macros/scicos_scicos
    predef clear
    genlib scicos_scicoslib
    clear script2var

Then things should work for your session and any following ones.
If you get some error when running genlib(), it is most probably because 
you don't have enough rights to overwrite the library with its update.

BR
Samuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20200303/fdb6448b/attachment.htm>


More information about the users mailing list