<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=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 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;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"Préformaté HTML Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.PrformatHTMLCar
        {mso-style-name:"Préformaté HTML Car";
        mso-style-priority:99;
        mso-style-link:"Préformaté HTML";
        font-family:Consolas;
        color:black;}
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;}
--></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=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:windowtext;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext;mso-fareast-language:EN-US'>Indeed. Isn’t it, but :::<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext;mso-fareast-language:EN-US'>Coming fron 5.x to 6.x, logical and in 5x is « & » and, like in C « && » in 6x.<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext;mso-fareast-language:EN-US'>So a pass is needed in all hundred of files to provide to clients, phonecontact, documentation, and so on – great, thank you so much ; I think it’s more important than « then » instruction.<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext;mso-fareast-language:EN-US'>Regards<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext;mso-fareast-language:EN-US'><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'>De :</span></b><span style='color:windowtext'> users <users-bounces@lists.scilab.org> <b>De la part de</b> Federico Miyara<br><b>Envoyé :</b> vendredi 10 avril 2020 18:16<br><b>À :</b> users@lists.scilab.org<br><b>Objet :</b> Re: [Scilab-users] ?==?utf-8?q? Incorrect color in function<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'><br><span style='font-family:"Courier New"'>Antoine,<br><br>I prefer the syntax without "then", it works, it is supported and the "then" seems redundant, but as you say, it is not related to that.<br><br>Thanks,<br><br>Federico Miyara </span><o:p></o:p></p><div><p class=MsoNormal>On 10/04/2020 11:03, Antoine Monmayrant wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>Hello,<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>It seems that you're missing a "then" but nonetheless, the problem is really related to legend(), wich is weird.<o:p></o:p></pre><pre>I can reproduce your color bug with<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>function a()<o:p></o:p></pre><pre>    if %t then<o:p></o:p></pre><pre>        plot()<o:p></o:p></pre><pre>    else<o:p></o:p></pre><pre>        legend()<o:p></o:p></pre><pre>    end<o:p></o:p></pre><pre>endfunction<o:p></o:p></pre><pre><o:p> </o:p></pre><pre><o:p> </o:p></pre><pre>but not with <o:p></o:p></pre><pre><o:p> </o:p></pre><pre>function a()<o:p></o:p></pre><pre>    if %t then<o:p></o:p></pre><pre>        plot()<o:p></o:p></pre><pre>    else<o:p></o:p></pre><pre>        legen()<o:p></o:p></pre><pre>    end<o:p></o:p></pre><pre>endfunction<o:p></o:p></pre><pre><o:p> </o:p></pre><pre> (only difference legend()->legen()).<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Antoine<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>Le Vendredi, Avril 10, 2020 15:28 CEST, Federico Miyara <a href="mailto:fmiyara@fceia.unr.edu.ar"><fmiyara@fceia.unr.edu.ar></a> a écrit: <o:p></o:p></pre><pre> <o:p></o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre><o:p> </o:p></pre><pre>Dear all,<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>When writing the following script in SciNotes (v. 6.1):<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>function y = testcolor(t)<o:p></o:p></pre><pre>     if 1==1<o:p></o:p></pre><pre>         y = sinc(t)<o:p></o:p></pre><pre>         plot(t, y)<o:p></o:p></pre><pre>         legend("sinc")<o:p></o:p></pre><pre>     else<o:p></o:p></pre><pre>         y = 1<o:p></o:p></pre><pre>     end<o:p></o:p></pre><pre>endfunction<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>the end of the if structure appears with the same brownish color as the <o:p></o:p></pre><pre>endfunction. Strangely, if copying and pasting here or into a word <o:p></o:p></pre><pre>processor document, the color is the expected purple (that's why I <o:p></o:p></pre><pre>removed all colors in this message).<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>It seems that the culprit is the legend clause.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Regards,<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Federico Miyara<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>_______________________________________________<o:p></o:p></pre><pre>users mailing list<o:p></o:p></pre><pre><a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><o:p></o:p></pre><pre><a href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a><o:p></o:p></pre><pre><o:p> </o:p></pre></blockquote><pre><o:p> </o:p></pre><pre>_______________________________________________<o:p></o:p></pre><pre>users mailing list<o:p></o:p></pre><pre><a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><o:p></o:p></pre><pre><a href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a><o:p></o:p></pre><pre><o:p> </o:p></pre><pre><o:p> </o:p></pre></blockquote><p class=MsoNormal><o:p> </o:p></p></div></body></html>