<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">Le 21/10/2020 à 20:12, Samuel Gougeon a
      écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:995e6d64-53ba-d3bc-3313-574f5efc1bfa@free.fr">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <p><font face="Arial">Hello,</font></p>
      <p><font face="Arial">The <a moz-do-not-send="true"
            href="https://help.scilab.org/docs/6.1.0/en_US/printf_conversion.html">printf_conversion
            page</a> tells that the "<i>"%c" directive accepts and
            displays an integer value converted to a character"</i>.<br>
          Yet, with Scilab 6.1.0<br>
        </font><font size="+1"><tt><br>
          </tt></font></p>
      <p><font size="+1"><tt>--> msprintf("AB %c\n", 3)</tt><tt><br>
          </tt><tt>msprintf: Wrong number of input arguments: data
            doesn't fit with format.</tt><tt><br
              class="Apple-interchange-newline">
          </tt></font></p>
      <font size="+1"><tt>--> mprintf("AB %c\n", "5")</tt><tt><br>
        </tt><tt>AB 5</tt><tt><br>
        </tt><tt><br>
        </tt><tt>--> mprintf("AB %c\n", "R")</tt><tt><br>
        </tt><tt>AB R</tt><tt><br>
        </tt><tt><br>
        </tt><tt>--> mprintf("AB %c\n", "RB")</tt><tt><br>
        </tt><tt>AB RB</tt><tt><br>
        </tt></font>
      <p>So, what's the difference between the %c and %s printing
        formats?</p>
    </blockquote>
    <p>In C language, <b>%c expects an </b><b>ascii code</b> and
      converts it into the corresponding character.<br>
      But Scilab' implementation of this format does not match C's one.<br>
      This is reported as bug <a moz-do-not-send="true"
        href="http://bugzilla.scilab.org/16564">16564</a>. At least,
      Scilab's printf_conversion page could be more accurate.<br>
    </p>
    <p> Samuel</p>
    <p><br>
    </p>
  </body>
</html>