<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Le 12/09/2018 à 22:08, Stéphane
Mottelet a écrit :<br>
</div>
<blockquote cite="mid:7ad98ccb-ae66-18b1-ce6e-e9f62ee67021@utc.fr"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<p>Le 12/09/2018 à 21:48, Samuel Gougeon a écrit :<br>
</p>
<blockquote type="cite"
cite="mid:c26d4f73-a731-f429-e476-c37918fb62a9@free.fr">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Hello Stéphane,<br>
<br>
Le 12/09/2018 à 17:02, Stéphane Mottelet a écrit :<br>
</div>
<blockquote
cite="mid:711c5235-efd8-0860-a51d-19ec9a6e0eed@utc.fr"
type="cite">Hi all, <br>
<br>
I hope some of you are still reading this list, which has a
very low traffic these days... I just discovered, while
working on <br>
<br>
<a class="moz-txt-link-freetext"
href="https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/codereview.scilab.org/#/c/20491/"
moz-do-not-send="true">https://codereview.scilab.org/#/c/20491/</a>
<br>
<br>
<a class="moz-txt-link-freetext"
href="https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/codereview.scilab.org/#/c/19114/"
moz-do-not-send="true">https://codereview.scilab.org/#/c/19114/</a>
<br>
<br>
that cells have the same type number, although a different
type string. Hence, when you want to differentiate between
structs, cells, lists, mlists, tlists, you cannot rely on
typeof(), </blockquote>
<br>
I guess you meant that we must use the typeof() instead of
type(). Anyway,...<br>
<br>
<blockquote
cite="mid:711c5235-efd8-0860-a51d-19ec9a6e0eed@utc.fr"
type="cite">since for mlists and tlists they return the
usertype, neither on type(), since it does not make the
difference between cells and structs. I know there exist
isstruct() and iscell(), but why do we have the same type
number ?? <br>
</blockquote>
<br>
I had the same question in mind for 2 years. So thanks for
asking it here explicitly!<br>
<br>
Since in Scilab 6 cells and structs are now native types, it
could have been the opportunity and the right moment to ascribe
a dedicated type() number to each of them, out of their
historical mlist type number 17.<br>
<br>
We may imagine that this conservatism is to avoid
back-compatibility issues.<br>
</blockquote>
<br>
There is more than that. For Scilab 6 structs, for k=1,2
getfield(k,...) returns the same result as Scilab 5.5.2<br>
<br>
--> str=struct("a",1,"b",1)<br>
str = <br>
<br>
a: [1x1 constant]<br>
b: [1x1 constant]<br>
<br>
<br>
--> getfield(1,str)<br>
ans =<br>
<br>
!st dims a b !<br>
<br>
<br>
--> getfield(2,str)<br>
ans =<br>
<br>
1 1<br>
<br>
as if str, in this example, was still a mlist. This is so
artificial, but certainely necessary ! <br>
</blockquote>
<br>
I must confess that i did not catch how the <a
href="http://bugzilla.scilab.org/show_bug.cgi?id=15034">bug 15034</a>
has been processed.<br>
I feel rather concerned about its processing. It looks to create an<br>
"hybrid/duplicate" type/typeof for struct(), so killing the
announcement they<br>
are native type in Scilab 6.<br>
To me, AFAIU, this is a confusing and worrying way to fix the <a
href="http://bugzilla.scilab.org/show_bug.cgi?id=15264">bug 15234</a>.<br>
Unless struct are finally not native at all in Scilab 6. If so, the
CHANGES file<br>
and the documentation should be fixed to cancel the announcement.<br>
<br>
<br>
<br>
</body>
</html>