[Gretl-devel] bug with null list in functions
Allin Cottrell
cottrell at wfu.edu
Wed May 2 09:36:19 EDT 2007
On Wed, 2 May 2007, Sven Schreiber wrote:
> <Example_script>
> function test(int i1, const list l1[null], const list l2[null])
> scalar a = nelem(l1)
> scalar b = nelem(l2)
> print a # <- should give 0 for the call below
> print b # <- should be 1
> print l1 # list should be empty/null
> end function
>
> open denmark
> list myl2 = LRM
> test(1, null, myl2)
> </Example_script>
I think this should now be fixed in CVS. One small thing: the
line "print l1" is read as just "print" (since, after the fix, l1
is null). This will print all the variables currently available.
Allin.
More information about the Gretl-devel
mailing list