Ignacio Diaz-Emparanza schrieb:
> Yes I think there are two different issues here: one is commands
vs.
> functions, and the other is how to do error handling. With respect to
> the error handling one could argue to have only one way of doing things.
> That would raise the question of what functions like mwrite() should
> return instead.
I think the output of mwrite() as a command should be:
"matrix XXX (rows, cols) correctly written on namefile.ext"
so that the user in simple scripts does not need to use the 'catch'
function to check if the process concluded OK.
But mwrite() isn't a command and Allin and Jack gave convincing (IMO)
reasons for that. The question is the return value as in:
genr myreturnval = mwrite(matx,"path/to/x.mat")
Maybe the return value could be a string holding the expanded full path
to the matrix file: "/home/user/path/to/x.mat" ?
-sven