Apifun  

Issue 606: The error message in apifun_checkflint is wrong.

Reported by Michael Baudin, Dec 2, 2011

-->apifun_checkflint()
 !--error 999 
msprintf: Wrong number of input arguments: at most 2 expected.
at line      58 of function apifun_checkflint called by :  
apifun_checkflint()

The block 


    [lhsnb,rhsnb]=argn()
    if ( rhsnb <> 4 ) then
        msgfmt = "%s: Wrong number of input argument: %d 
expected.\n"
        errmsg = msprintf(gettext(msgfmt), 
"apifun_checkflint", rhsnb,4)
        error(errmsg)
    end


must be replaced with


    [lhsnb,rhsnb]=argn()
    if ( rhsnb <> 4 ) then
        msgfmt = "%s: Wrong number of input argument: %d 
expected.\n"
        errmsg = msprintf(gettext(msgfmt), 
"apifun_checkflint", 4)
        error(errmsg)
    end

There is the same error in apifun_checkcallable.
There is probably the same error in many other functions.

Comment 1 by Michael Baudin, Sep 8, 2012

Fixed at:

http://forge.scilab.org/index.php/p/apifun/source/commit/64/
Status: Fixed

Created: 6 years 6 months ago by Michael Baudin

Updated: 5 years 9 months ago

Status: Fixed

Labels:
Type:Defect
Priority:Medium