<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hello,<br>
      <br>
      Le 19/02/2016 10:36, Pierre-Aimé Agnel a écrit :<br>
    </div>
    <blockquote cite="mid:56C6E232.70901@scilab-enterprises.com"
      type="cite">
      <meta content="text/html; charset=windows-1252"
        http-equiv="Content-Type">
      <font face="Calibri">Hello,<br>
        <br>
        A flag has been introduced to tackle the A+[] operation<br>
      </font><tt>help</tt><tt>("</tt><tt>oldEmptyBehaviour")</tt><tt><br>
      </tt><tt>oldEmptyBehaviour</tt><tt>("</tt><tt>on")</tt><tt><br>
      </tt><tt>1 + []</tt><tt><br>
      </tt><tt><br>
      </tt><tt>oldEmptyBehaviour</tt><tt>("off")</tt><tt><br>
      </tt><tt>1+[]</tt><tt><br>
      </tt><font face="Calibri"><br>
      </font><br>
      <font face="Calibri"><tt>oldEmptyBehaviour</tt><tt>("<font
            face="Calibri">query</font>")</tt><tt><br>
        </tt><br>
        <br>
        We kept the warning for both behaviours if users want to migrate
        "softly".<br>
        This is also done to protect the scripts.</font><br>
    </blockquote>
    <br>
    <font face="Calibri">Up to Scilab 5.5.2, we had <br>
    </font><tt>strcat([],"anything") == "" // as well as</tt><tt><br>
    </tt><tt>[] + "anything" == "" </tt><tt><br>
    </tt><font face="Calibri">The fact that both expressions give the
      same result is correct, since they mean exactly the same
      operation.<br>
      <br>
      But with the new behavior of +[], both results become distinct:<br>
    </font><tt>strcat([], "anything")  // still returns "" (scilab
      6.0-b1) , while</tt><tt><br>
    </tt><tt>[]+"anything"  // now returns []</tt><tt><br>
    </tt><font face="Calibri"><br>
      This is why <b>we </b><b>could prefer from strcat([]) or
        strcat([], "anything") now to return [] instead of ""</b>.<br>
      What's your opinion about this?<br>
      <br>
      Moreover, most of string functions processing [] <b>already</b>
      return [] : <b>convstr([]) => [], string([]) => [], etc</b>.<br>
      <br>
      If the behavior of strcat([]) is changed, this should not depend
      on the </font><font face="Calibri"><tt>oldEmptyBehaviour </tt></font>flag.<br>
    <br>
    Best regards<br>
    <br>
    Alain Lamy and Samuel Gougeon<br>
    <font face="Calibri"><tt></tt><br>
    </font>
  </body>
</html>