On Fri, 5 Jan 2007, Sven Schreiber wrote:
>> I do see "include" as problematic (since that's
designed for importing
>> function definitions), but "run" is not so bad. In current CVS you
>> invoke "run" inside functions (though this is not much tested).
This works like a charm for me! Tested with 'matrix' and 'print'
commands in the file which is run. Very cool, now everything
Glad to hear it!
Of course this immediately leads to new questions: Is it
possible to return more than one matrix from the function? I
tried to adapt section 10.2 of the user guide, but only got
You can do this, but the "extra" returns have to be indirect. You
need to update your copy of the user guide!
(Though there should be a way of doing this via the GUI.)
function matfun (matrix *B, matrix *C)
matrix A = mnormal(2,2)
matrix B = mnormal(2,2)
matrix C = mnormal(2,2)
return matrix A
matrix A = matfun(&B, &C)
print A B C