Hi Allin,
Thanks for the quick fix which works fine here on my machine.
Also, thanks, Sven, for confirming the bug.
Best
Artur
Am 26.07.23 um 18:37 schrieb Cottrell, Allin:
> On Wed, Jul 26, 2023 at 9:00 AM Artur T. <atecon(a)posteo.de> wrote:
>>
>> Hi folks,
>>
>> using latest git under Ubuntu yields a weird error with a loop. The
>> following definitely used to work in the past but fails now with an
>> "Data error".
>
> Thanks for the report, Artur. Here's a minimal script to expose the
> bug you found:
>
> <hansl>
> function void list_access (const list L)
> series dx = L.dx
> end function
>
> nulldata 10
> series dx = index
> loop i=1..3
> # fails after first iteration
> list_access(dataset)
> endloop
> </hansl>
>
> This sort of thing last worked with gretl 2022b; unfortunately it has
> been broken since 2022c. That is because (a) 2022c introduced
> compilation of "genrs" within functions that are called from a loop
> (as in this example), and (b) the internal code to handle expressions
> of the form listname.seriesname was not robust with respect to such
> compilation. In fact it was funky old ad-hocery.
>
> The problem is now fixed in git, with a proper, modern backend for
> listname.seriesname.
>
> To be clear, here's the exact scope of the bug that's now fixed:
>
> * It bites when function F uses listname.seriesname and F is called
> within a loop.
> * It does not bite if F is called repeatedly, but not in a loop.
> * It does not bite if listname.seriesname is called directly within a
> loop (not via a user function).
>
> Allin
> _______________________________________________
> Gretl-devel mailing list -- gretl-devel(a)gretlml.univpm.it
> To unsubscribe send an email to gretl-devel-leave(a)gretlml.univpm.it
> Website:
https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/