<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Le 06/02/2020 à 22:55, Federico Miyara
      a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:91e07b07-be0b-66bc-25a8-8264c8b3fe43@fceia.unr.edu.ar">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <br>
      <font face="Courier New">Dear All,<br>
        <br>
        I'm trying to use the error messages available at <a
          class="moz-txt-link-freetext"
          href="https://help.scilab.org/docs/6.0.2/en_US/error_table.html"
          moz-do-not-send="true">https://help.scilab.org/docs/6.0.2/en_US/error_table.html</a><br>
        <br>
        However, I cannot find one that describes precisely what is
        wrong.<br>
        <br>
        My argument is any scalar, vector, matrix or N-D array of real
        or complex numbers.<br>
        <br>
        If I use<br>
        <br>
           "%s: Argument #%d: Decimal or complex number expected.\n"<br>
        <br>
        it may convey the idea that only scalars are admissible. I think
        the word "number" jeopardizes the message. It would be better if
        the word "type" were clearly mentioned, for instance "Wrong
        input type: %d expected.\n"<br>
      </font></blockquote>
    <p><br>
    </p>
    <p>Yes, but to me, "input" is useless, since only input types are
      testable. In addition, the argument's number must appear. So yes,
      something like</p>
    <p><font face="Courier New">"%s: Argument #%d: Decimal or complex
        type expected.\n"<br>
        <br>
      </font><tt>would be better</tt><tt>. A still more open message is
        possible and already listed:</tt></p>
    <p> </p>
    <div class="refsection">
      <div class="refsect2">
        <div class="screen">
          <p><font face="Courier New">"%s: Argument #%d: %s expected.\n"</font></p>
        </div>
      </div>
    </div>
    <blockquote type="cite"
      cite="mid:91e07b07-be0b-66bc-25a8-8264c8b3fe43@fceia.unr.edu.ar"><font
        face="Courier New"> <br>
        If I use<br>
        <br>
           "%s: Argument #%d: Hypermatrix expected.\n"<br>
        <br>
        it may be interpreted as if, for instance, a polynomial
        hypermatrix would be acceptable.<br>
      </font></blockquote>
    <p>Yes, or of any other type, since this message only informs about
      the size / format, not about the data type. It is is in the same
      messages section "Checking container's dimension and sizes" than
      other messages about the shape / array size. </p>
    <p><br>
    </p>
    <blockquote type="cite"
      cite="mid:91e07b07-be0b-66bc-25a8-8264c8b3fe43@fceia.unr.edu.ar"><font
        face="Courier New"> <br>
        Testing abs() on a string yields<br>
        <br>
           --> abs("hello")<br>
           in builtin                abs <br>
        <br>
           Function not defined for given argument type(s),<br>
             check arguments or define function %c_abs for overloading.<br>
        <br>
        This gives a hint where is the problem, but does not indicate
        what type is expected, which would be more useful.<br>
      </font></blockquote>
    <p><br>
    </p>
    <p>But impossible. An error message is not aimed to replace the help
      page. There may be many possibilities. <br>
      If in the function that you write you want to display the
      documented list of available syntaxes for this function, just
      before the proper error message, then <tt><a
          moz-do-not-send="true"
href="http://sgougeon.free.fr/scilab/help/uman/scilab_en_US_help/disp_usage.html">disp_usage()</a>
      </tt>is made for you, available in the uman package:
      <a class="moz-txt-link-freetext" href="https://atoms.scilab.org/toolboxes/uman">https://atoms.scilab.org/toolboxes/uman</a><font face="Courier New"> 
        <br>
        atomsInstall uman<br>
      </font></p>
    <p>Samuel</p>
    <br>
  </body>
</html>