On Thu, 16 Jul 2015, Sven Schreiber wrote:
Hi,
while I was testing the SVAR addon I ran into a bug that has its roots in
gretl. The code below shows the problem, namely that even though the function
hey() officially returns a matrix, if it's a 1x1 matrix _and_ if the caller
does not explicitly cast the output to a matrix type (with the 'matrix' alias
for genr), then gretl puts the return value into a scalar type. And if the
caller then wants to use this variable as a matrix (because that's what it's
supposed to be), it fails.
So I think gretl should honor the return type of a user-defined function
always.[...]
That sounds right to me. Another thing for next week's list (I'm
taking the next few days off).
Allin