[Gretl-devel] null list as parameter

Allin Cottrell cottrell at wfu.edu
Sat May 24 13:49:17 EDT 2008


On Sat, 24 May 2008, Stefano Balietti wrote:

> I had already mentioned this bug, but I can't find where. Anyway, it
> is still here. With a function declaration like this:
> 
> function foo ( series a, scalar b[0::1], scalar c[0:2:1], const list
> d[null], scalar e[0:2:0])
> 
> I'm supposed to be able to invoke the function just with a simple:
> 
> foo(a)
> 
> where a is a a series obviously.
> 
> Instead, gretl wants at least:
> 
> foo(a,b,c,d)

Could you post a complete test case, please?  I think there must 
be some special complication at work, because the following script 
works fine here:

<script>
function myfoo (series a, scalar b[0::1], scalar c[0:2:1], 
                const list d[null], scalar e[0:2:0])
  print a -o
  print d
  print b c e
end function

open data4-1
myfoo(sqft)
</script>

It prints:

<output>
? myfoo(sqft)

     Obs             a

       1          1065
       2          1254
       3          1300
       4          1577
       5          1600
       6          1750
       7          1800
       8          1870
       9          1935
      10          1948
      11          2254
      12          2600
      13          2800
      14          3000


              b =  1.00000
              c =  1.00000
              e =  0.00000
</output>

Allin.


More information about the Gretl-devel mailing list