Le 14/08/2017 à 14:50, Viktor Mileikovskyi a écrit :
Dear Samuel!
Many thanks!
For me there is no problem to run SciLab as admin, use edit %s_i_s
(i=1:4) and add
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.
else
TF=%f
or
else
error("Comparison of complex numbers is undefined")
etc.
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).
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.
In addition, in boolean operations %nan does not propagate and is
equivalent to %T:
--> [%f %t] & %nan
ans =
F T
--> [%f %t] | %nan
ans =
T T
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.
Thanks for your input.
Best regards
Samuel
_______________________________________________
dev mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/dev