<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>
Well, to be sure, there are some functions that do not work on
booleans. For instance, mean(), max() and mean() will cause error;
but not sum() and prod(). <br>
<br>
However, I think exists() is used mostly in conditionals, where
both types work fine. And if getting errors, they can be easily
solved by using double() to convert to double. This workaround
could be included in the documentation. <br>
<br>
If not fixed in this release, a warning could be issued in the
documentation that the current output argument type will be
changed to boolean in the next release.<br>
<br>
Federico Miyara<br>
<br>
</font><br>
<div class="moz-cite-prefix">On 09/02/2021 00:27, Antoine Monmayrant
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:7fbeab24-7f23-d8fd-a42b-75a60cc14b9c@laas.fr">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>Hello Federico,</p>
<p>I agree with you that this would make more sense.<br>
Could such a change be implemented for a point release?<br>
I assume it would introduce some bugs in existing code relying
on the (unusual) double output...</p>
<p>Antoine<br>
</p>
<div class="moz-cite-prefix">On 09/02/2021 03:24, Federico Miyara
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:d05c307f-53af-c674-7db0-09d8d78b1f40@fceia.unr.edu.ar">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<br>
Dear all,<br>
<br>
<font face="Courier New">I had already mentioned this a while
ago (<a class="moz-txt-link-freetext"
href="http://mailinglists.scilab.org/Scilab-users-exists-yields-double-tt4039853.html"
moz-do-not-send="true">http://mailinglists.scilab.org/Scilab-users-exists-yields-double-tt4039853.html</a>),
but as I guess we are in the update season, it would be good
opportunity to fix this (if there isn't strong opposition, or
a good reason for this behavior, of course).<br>
<br>
I'm referring to the fact that the function exists() should by
nature yield a Boolean result such as T or F. However, it
yields 1 or 0. While this is not a big deal, similar functions
performing a binary decision on their arguments, such as
isreal(), isvector(), isfile() and many others, yield Boolean
results. <br>
<br>
Regards,<br>
<br>
Federico Miyara </font><br>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top: 1px solid #D3D4DE;">
<tbody>
<tr>
<td style="width: 55px; padding-top: 18px;"><a
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient"
target="_blank" moz-do-not-send="true"><img
src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif"
alt="" style="width: 46px; height: 29px;"
moz-do-not-send="true" width="46" height="29"></a></td>
<td style="width: 470px; padding-top: 17px; color:
#41424e; font-size: 13px; font-family: Arial,
Helvetica, sans-serif; line-height: 18px;">Libre de
virus. <a
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient"
target="_blank" style="color: #4453ea;"
moz-do-not-send="true">www.avast.com</a> </td>
</tr>
</tbody>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1"
height="1" moz-do-not-send="true"> </a></div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org" moz-do-not-send="true">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users" moz-do-not-send="true">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<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>