grand(m,n): wrong error message. grand(m,n,p): wrong output
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
As rand(m,n) and rand(m,n,p) run well, it is easy to try and hope for the same grand(m,n) or grand(m,n,p).
With Scilab 6.0.0-a1:
--> grand(2,3)
Undefined variable: vect
at line 4 of function %s_grand ( C:\PROGRA~1\scilab\SCILAB~1.0-A\modules\randlib\macros\%s_grand.sci line 13 )
in builtin grand
This message is wrong. The %s_grand overload should not be called since no complex numbers are involved.
In Scilab 5.5.2, we get:
-->grand(2,3)
!--error 999
grand: Wrong type for input argument #3: String expected.
Moreover:
--> grand(4,3,2)
ans =
2. 2. 2. 2.
This output is meaningless. An error message would be expected, as long as defaults are not supported (see bug 14056).
In 5.5.2, we get the same as above:
-->grand(4,3,2)
!--error 999
grand: Wrong type for input argument #4: String expected.
ERROR LOG:
----------
See above
HOW TO REPRODUCE THE BUG:
-------------------------
grand(2,3)
grand(3,4,2)