Hi,
I have the following strange behavior which was a bit difficult to track
down. Sorry, cannot give a minimal example because the problem then
doesn't appear. In my more complex setup it's reproducible, however.
The trigger is a "var 0 endolist" command, which is invalid because the
lag order isn't positive. (Actually it's "var km1 endolist; xlist
@somestring --silent", and km1 sometimes happens to be 0.)
My first minor complaint is that here gretl's error message could be a
bit more specific than just "invalid argument".
OK, so I'm trying to use "catch", and immediately after the "catch
var"
line I have:
err = $error
if err
print err
<...>
endif
But: Now gretl, instead of printing the err and so on, throws another
error message "unpaired if" (re-translated from German). How can that
be? That must be bogus, because gretl doesn't complain in all those
cases where $error==0 (which happens most of the time; all this is
inside a random simulation loop).
Of course, the fix for me is to properly handle the km1==0 case in the
first place. But because of the mentioned behavior of gretl, it took me
a while to get to that insight.
thanks,
sven