Am 15.03.19 um 21:05 schrieb Cottrell, Allin:
On Fri, Mar 15, 2019 at 4:01 PM Cottrell, Allin
> Gretl shouldn't crash, but there's a rather obvious bug in your code:
> you are assigning
> to self.fc from a function (meanf) that doesn't return anything.
For some reason, I always think that I can simply attach new information
(scalar, matrix etc.) to an already existing bundle by defining
something like self.fc = foo without having to define what meanf()
actually returns. But this is my fault. Thanks for clarification. The
"workaround" is totally fine to me.
> In general gretl should be
> be able to catch that bug. I guess the problem in this case is that
> gretl has no means of
> knowing what type of return value is wanted: "self.fc" carries no type
On experimentation, that's indeed the issue: if you do
matrix self.fc = mean(&self)
you get an error message and not a crash. Still, of course, the
crash should not occur.
Thanks for figuring that out.