[Scilab-users] imprecise error messages

Federico Miyara fmiyara at fceia.unr.edu.ar
Thu Feb 6 22:55:25 CET 2020


Dear All,

I'm trying to use the error messages available at 
https://help.scilab.org/docs/6.0.2/en_US/error_table.html

However, I cannot find one that describes precisely what is wrong.

My argument is any scalar, vector, matrix or N-D array of real or 
complex numbers.

If I use

    "%s: Argument #%d: Decimal or complex number expected.\n"

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"

If I use

    "%s: Argument #%d: Hypermatrix expected.\n"

it may be interpreted as if, for instance, a polynomial hypermatrix 
would be acceptable.

Testing abs() on a string yields

    --> abs("hello")
    in builtin                abs

    Function not defined for given argument type(s),
      check arguments or define function %c_abs for overloading.

This gives a hint where is the problem, but does not indicate what type 
is expected, which would be more useful.

Regards,

Federico Miyara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20200206/3d968a5e/attachment.htm>


More information about the users mailing list