I've got another problem,

I am trying check whether the variable "time" is present in list L1. This correct position is shown in the first example below. But if I add this inlist-command to a function environment, the scalar check2 = 0 but should be 2. I am using gretl (built: 2013-03-17) on Windows.

<hansl>
set messages off
set echo off
open denmark --quiet

#Works
ols LRM const time diff(LRM)
L1 = $xlist
scalar check1 = inlist(L1,const)
check1
scalar check2 = inlist(L1,time)
check2

#Within a function check2 gives the wrong result
ols LRM const time diff(LRM)
L1 = $xlist
function void Ltest (list L)
    scalar check1 = inlist(L,const)
    print check1
    scalar check2 = inlist(L,time)
    print check2
end function
Ltest(L1)
</hansl>


Artur