<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<font face="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 <br>
</font><br>
<div class="moz-cite-prefix">On 10/04/2020 11:03, Antoine Monmayrant
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:1c33-5e907d00-43-59e90d80@164182252">
<pre class="moz-quote-pre" wrap="">Hello,
It seems that you're missing a "then" but nonetheless, the problem is really related to legend(), wich is weird.
I can reproduce your color bug with
function a()
if %t then
plot()
else
legend()
end
endfunction
but not with
function a()
if %t then
plot()
else
legen()
end
endfunction
(only difference legend()->legen()).
Antoine
Le Vendredi, Avril 10, 2020 15:28 CEST, Federico Miyara <a class="moz-txt-link-rfc2396E" href="mailto:fmiyara@fceia.unr.edu.ar"><fmiyara@fceia.unr.edu.ar></a> a écrit:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
Dear all,
When writing the following script in SciNotes (v. 6.1):
function y = testcolor(t)
if 1==1
y = sinc(t)
plot(t, y)
legend("sinc")
else
y = 1
end
endfunction
the end of the if structure appears with the same brownish color as the
endfunction. Strangely, if copying and pasting here or into a word
processor document, the color is the expected purple (that's why I
removed all colors in this message).
It seems that the culprit is the legend clause.
Regards,
Federico Miyara
_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>