Am 07.04.2025 um 22:35 schrieb Allin Cottrell:
On Mon, 7 Apr 2025, Sven Schreiber wrote:
>
> OK, but two questions remaining:
>
> 1) See my other email some minutes ago: the listmaker example with
> list "L = m.xlist - m.instlist" seems to do just that, no?
No, that's just a matter of subtracting one given list (vector of
ints) from another. It doesn't require any access to the actual series
content. Your example requires such access, if gretl is to realize
that series 5 and 6 already contain the requested lags of LRM.
OK, that's
understandable.
> 2) There's still the weirdness of my OP that it did work when I
> called my other function rhslags() which shouldn't have changed
> anything AFAICS.
By passing the $model bundle as an argument to another (arbitrary)
function you made its list contents visible, and they remained visible
after that function returned.
Now that really is black magic! Indeed, I just tested this by creating
the following totally useless function
function void fdummy(const bundle mod)
print "dummy here"
end function
and then in my GUI-based function I issued the call 'fdummy($model)' --
as you said, everything works nicely after that.
I'm always happy to learn, but this strikes me as really weird. Also,
you wrote "(arbitrary) function", so I replaced the call to my fdummy
function with a call to a built-in, as in 'getkeys($model)'. Then it was
back to square one, failing again! So is it just arbitrary
_user-defined_ functions?
thanks
sven