<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;
        mso-fareast-language:EN-US;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;
        mso-fareast-language:EN-US;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:28338225;
        mso-list-type:hybrid;
        mso-list-template-ids:-1283565812 -317180926 67895299 67895301 67895297 67895299 67895301 67895297 67895299 67895301;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:\F0E8;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l1
        {mso-list-id:786316930;
        mso-list-template-ids:1921778020;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=FR link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='color:windowtext'>Hello Samuel,<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Glad to see you confirm this bug<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Context is executed at line 26 of the A.sce file, and not before :<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>-</span><span style='font-family:Wingdings;color:windowtext'>à</span><span style='color:windowtext'> xcos_simulate(scs_m, 4);<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>So in scilab 6.1.0, the A.ctx is executed.<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>I also add in A610.zcos the instruction<o:p></o:p></span></p><ul style='margin-top:0cm' type=disc><li class=MsoListParagraph style='color:windowtext;margin-left:0cm;mso-list:l0 level1 lfo2'>mprintf("Running context in xcos. ...So A=%i\n",A)<o:p></o:p></li></ul><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>And then here is the track in my PC when running A.sce in xcos 6.1.0 :<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>--> exec('C:\0 - tampon\A.sce', -1)<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Chargement du contexte d'exécution A.ctx<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Running context in xcos. ...So A=50<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Where we can see that A=50 inside A610.zcos.<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>We also can see that A is lost a the end of the context execution<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'><img width=195 height=91 style='width:2.0333in;height:.95in' id="_x0000_i1035" src="cid:image004.jpg@01D5EF36.5DD54CB0"><o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>This bad behavior also explains that my projects don’t migrate from xcos 5.5.2 to 6.1.0<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Be sure that in my projects, the ct xis a set of a lot of scilab instructions who generate variables.<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>These variables are use in any bloscks and under blocks of my main shemes<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>BR<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='color:windowtext;mso-fareast-language:FR'>De :</span></b><span style='color:windowtext;mso-fareast-language:FR'> users <users-bounces@lists.scilab.org> <b>De la part de</b> Samuel Gougeon<br><b>Envoyé :</b> samedi 29 février 2020 17:53<br><b>À :</b> users@lists.scilab.org<br><b>Objet :</b> Re: [Scilab-users] Context error in Xcos Scilab 6.1.0<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Le 29/02/2020 à 17:41, Samuel Gougeon a écrit :<span style='mso-fareast-language:FR'><o:p></o:p></span></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>Hello Pierre,<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Le 29/02/2020 à 11:32, Perrichon a écrit :<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Hello,<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>I try to understand and find a reason why my projects done with xcos scilab 5.5.2 not run i 6.1.0<o:p></o:p></p><p class=MsoNormal>So I isolate at least one reason in a basic test program (see attached files)<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Here, zcos file are lunched into scilab 5.5.2 or 6.10, with the A.sce file which test the version<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>A.ctx is a context file. Here is a simple variable definition A=50 in that case.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Every zcos file contains in its simulation contexte, the instruction « exec("A.ctx") » ; accessible with simulation-> context modifying <o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>To run this program, make a directory, a copy of the attached files, and change eventually line 4 in A.sce :<o:p></o:p></p><p class=MsoNormal>Root="c:\0 - tampon"                                                                // Répertoire de travail pour le test<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>So run A.sce inside xcos scilab 5.5.2 or 6.1.0<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Scilab 5.5.2 run correctly :<o:p></o:p></p><p class=MsoNormal><diagram image><br><br><br><o:p></o:p></p><p class=MsoNormal>Scilab 6.1.0 is bugged :<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></blockquote><p><o:p> </o:p></p><p>Apparently, the problem is that the context is not executed when the diagram is loaded.<br>Despite what the context message indicates:<o:p></o:p></p><p><o:p> </o:p></p><p>Indeed, the message mprintf("Chargement du contexte d''exécution %s\n\n",FichierContexte)<br>set in the context is not displayed when the diagram is loaded in 6.1.0 ; only when the context<br>is updated (or simply edited and revalidated).<o:p></o:p></p><p>With Scilab 5.5, the context is not executed when loading the diagram,but when running it.<o:p></o:p></p><p>So, to me, there are apparently 2 issues:<o:p></o:p></p><ol start=1 type=1><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo1'><span style='mso-fareast-language:FR'>The <i>Set Context</i> message should be fixed: "... and every time the diagram is <b>run</b>" (not loaded)<o:p></o:p></span></li><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo1'><span style='mso-fareast-language:FR'>The fact that the context is executed when the diagram is run should be restored in Scilab 6.<o:p></o:p></span></li></ol></blockquote><p>Sorry, i don't know what occurred with my first trial, but now it works:<br>In 6.0.2 and 6.1.0, the message is well displayed when the diagram is<i> run</i>.<br>The error message displayed on the icon is the following:<o:p></o:p></p><p><img width=577 height=53 style='width:6.0083in;height:.55in' id="_x0000_i1026" src="cid:image003.png@01D5EF35.71A0B3C0"><o:p></o:p></p><p><o:p> </o:p></p><p>Samuel<o:p></o:p></p><p class=MsoNormal><span style='mso-fareast-language:FR'><o:p> </o:p></span></p></div></body></html>