BUG DESCRIPTION:
----------------
The help information of the "call" function describes argument "py1, ..." as:
"are the positions of output variables (possibly equal to pxi ) in the syntax of the routine"
The "possibly equal to pxi" does not seem to be true in scilab-6.0.0, it gives a wrong return value.
ERROR LOG:
----------
There is no error message, but the results of the function call are wrong.
HOW TO REPRODUCE THE BUG:
-------------------------
Write fortran subroutine "sub2.f":
subroutine sub2(n, m)
implicit none
integer n, m
m=n+1
end
Compile:
gfortran -O -fPIC -c -o sub2.o sub2.f
Turn into share object:
gcc -shared sub2.o -o sub2.so
in Scilab 6.0.0 (Feb 14 2017, 12:49:55)
Link:
link("./sub2.so", ["sub2"])
N=3
[M, K] = call("sub2", N, 1, "i", "out", [1, 1], 1, "i", [1, 1], 2, "i")
Result:
K =
-1.460D+09
M =
-1.460D+09
OTHER INFORMATION:
------------------
If arguments are either input or output, but not both the
call gives the expected result:
M = call("sub2", N, 1, "i", "out", [1, 1], 2, "i")
Result:
M =
4.