Am 16.06.2024 um 16:29 schrieb Allin Cottrell:
On Sun, 16 Jun 2024, Sven Schreiber wrote:

Am 16.06.2024 um 15:00 schrieb Cottrell, Allin:
"bL" is the name of a function, not a bundle, so "bL.L" is a nonsense
string. Is the following what you meant to write?

Whoops, this happened when trying to make the example as minimal as possible.

So here's a new variation of what I'm trying to show:

...
b.L is reported as a matrix at caller level because inside a bundle it's just a vector of (putative) series ID numbers. If it turns out that there are in fact series with those ID numbers at caller level, the vector can be extracted as a list. But that's not the case here: the series "x" inside the function has ID 5 (the next number after IDE with ID 4 in the denmark dataset), and there's no series with that ID at caller level.

Yep, I basically know all that. I'm also not exactly sure what I'd prefer in this case. But the point is that when leaving the function, the list inside the bundle becomes invalid, but nobody tells the user about this situation. Instead, you get type changes and other side effects that are only expected when you really know the internals of gretl. So perhaps what I'm trying to say is that some warning or error might be useful.

Notice also that when you do 'print b' on the outside scope after the function call, gretl says:

bundle b:
  L (list)

So gretl itself is also stumbling over this. Again, as my title says, all this is quite subtle and I don't know what a good solution would be.

cheers

sven
_______________________________________________
Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it
To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it
Website: 
https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/

Reply via email to