Hi,
this time I have a working example insofar as the following script
crashes gretl (recent cvs) for me:
<hansl>
open denmark
dataset addobs 4
# script operates on denmark with obs added until 1988:3
list lhs = IBO IDE LRM LRY
function void mycheck(list lhs, series rhs)
list allrhs = null
loop foreach i lhs
list rhs_$i = rhs(-1) # trivial example
if i=1
list allrhs = rhs_$i
else
list allrhs = allrhs ; rhs_$i
endif
endloop
system method=SUR
equations lhs allrhs
end system
fcast 1987:4 1988:3
end function
smpl 1974:1 1987:3
mycheck(lhs,LRM)
</hansl>
Maybe there is again a bug in the script, but I guess we agree that
gretl shouldn't crash.
Actually the background for testing this script was that I had the
following situation in a bigger, more realistic context:
1. do dynamic 3-step forecasts inside a function
2. do them sequentially in the sense of adding one obs at a time (for
forecast evaluation)
3. when the loop got to the penultimate available observation (in this
case sample end at 2010:10, so data available until 2010:11, but the
workfile range set until 2011:4 or so), the 3-step 'fcast' command only
produced forecasts for two periods, until 2010:12; the third row of the
$fcast output was simply empty!
4. furthermore, trying to access the third row of $fcast to copy the
value gave the error message "index 1 out of bounds" which is misleading
at best.
thanks and good luck hunting the bug,
sven