<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Le 14/08/2017 à 14:50, Viktor
Mileikovskyi a écrit :<br>
</div>
<blockquote
cite="mid:1502712049.879715928.14p8z70q@frv42.fwdcdn.com"
type="cite"><span class="xfm_42813660">
<div><span
style="font-size:10pt;line-height:12pt;font-family:Arial;"
class="xfmc1">Dear Samuel!</span><br>
</div>
<div><span
style="font-size:10pt;line-height:12pt;font-family:Arial;"
class="xfmc1"><br>
</span></div>
<div><span
style="font-size:10pt;line-height:12pt;font-family:Arial;"
class="xfmc1">Many thanks!<br>
</span></div>
<div><span
style="font-size:10pt;line-height:12pt;font-family:Arial;"
class="xfmc1"><br>
</span></div>
<div><span
style="font-size:10pt;line-height:12pt;font-family:Arial;"
class="xfmc1">For me there is no problem to run SciLab as
admin, use edit %s_i_s (i=1:4) and add<br>
</span></div>
</span></blockquote>
<br>
But it is a too specific status. Any user -- even not admin --
should be able to extend the overload without modifying native
Scilab's code, even without write access to Scilab installation
directory.<br>
<br>
<blockquote
cite="mid:1502712049.879715928.14p8z70q@frv42.fwdcdn.com"
type="cite"><span class="xfm_42813660">
<div><span
style="font-size:10pt;line-height:12pt;font-family:Arial;"
class="xfmc1"><br>
</span></div>
<div><span
style="font-size:10pt;line-height:12pt;font-family:Arial;"
class="xfmc1">else<br>
</span></div>
<div><span
style="font-size:10pt;line-height:12pt;font-family:Arial;"
class="xfmc1"> TF=%f<br>
</span></div>
<div><span
style="font-size:10pt;line-height:12pt;font-family:Arial;"
class="xfmc1"><br>
</span></div>
<div><span
style="font-size:10pt;line-height:12pt;font-family:Arial;"
class="xfmc1">or<br>
</span></div>
<div><span
style="font-size:10pt;line-height:12pt;font-family:Arial;"
class="xfmc1"><br>
</span></div>
<div><span
style="font-size:10pt;line-height:12pt;font-family:Arial;"
class="xfmc1">else<br>
</span></div>
<div><span
style="font-size:10pt;line-height:12pt;font-family:Arial;"
class="xfmc1"> error("Comparison of complex numbers is
undefined")<br>
</span></div>
<div><span
style="font-size:10pt;line-height:12pt;font-family:Arial;"
class="xfmc1"><br>
</span></div>
<div><span
style="font-size:10pt;line-height:12pt;font-family:Arial;"
class="xfmc1">etc.<br>
</span></div>
<div><span
style="font-size:10pt;line-height:12pt;font-family:Arial;"
class="xfmc1"><br>
</span></div>
<div><span
style="font-size:10pt;line-height:12pt;font-family:Arial;"
class="xfmc1">The error is a good idea. It is more correct
that in MatLab (comparing of the real part only). But %NAN
is also possible, meaning that the operation can not provide
any "logical number", 1 (%t) or 0 (%f).</span></div>
</span></blockquote>
<br>
A boolean is expected as result. So we can't return %nan, that is of
decimal type. In Scilab, unlike in Matlab (AFAIK), the boolean type
is specific. <br>
In addition, in boolean operations %nan does not propagate and is
equivalent to %T:<br>
<tt>--> [%f %t] & %nan</tt><tt><br>
</tt><tt> ans =</tt><tt><br>
</tt><tt> F T</tt><tt><br>
</tt><tt><br>
</tt><tt>--> [%f %t] | %nan</tt><tt><br>
</tt><tt> ans =</tt><tt><br>
</tt><tt> T T</tt><tt><br>
</tt><br>
This is why i will stick to issuing an error message. By the way,
this is also the best way to make the user aware of the issue and
informed on how overloading the comparison.<br>
<br>
Thanks for your input.<br>
<br>
Best regards<br>
Samuel<br>
<br>
</body>
</html>