Am 02.12.22 um 12:36 schrieb Sven Schreiber:
Hi, consider this fairly minimal code example:

<hansl>

open denmark
loop i = $tmax..$tmax + 9
     catch value = LRM[i]
     eval $error     # This line necessary to provoke the problem!
endloop

</hansl>

What I'm getting on gretl 2022c is that in the first loop iteration it works as expected, namely that catch isn't necessary (since LRM[$tmax] gives the last available obs) and the error value is zero.  Directly afterwards for i==$tmax+1 gretl says "index value 56 out of bounds". This is correct, but that's exactly what 'catch' should, well, catch.

Notice that when the $error value isn't accessed, then gretl does _not_ complain!

Yes, I can confirm this which gretl build 2-3 weeks ago.

It's really about the $error accessor. This, for instance, also fails:

<hansl>
   loop i = $tmax..($tmax + 1)
     catch value = L.LRM[i]
     scalar err = $error
    endloop
</hansl>


Artur
_______________________________________________
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