[Gretl-devel] Small bug

Sven Schreiber svetosch at gmx.net
Thu May 5 08:29:43 EDT 2011


Am 05.05.2011 07:32, schrieb Marcin Błażejowski:
> Hi,
> simple script:
> 
> <script>
> set echo off
> set messages off
> 
> function void FOO (matrix mat)
>     printf "%d\n", nelem(mat)
> end function
> 
> nulldata 10
> 
> matrix foo = zeros(2,1)
> FOO(foo)
> 
> foo[1,1] = 1
> FOO(foo)
> </script>
> 
> In both situations we get what we excpect: 2
> 

I'm surprised it works at all, according to the docs nelem() is only for
lists, not for matrices.

So I'd say the fact that it doesn't spit out a (meaningful) error
message always is the true bug.

cheers,
sven




More information about the Gretl-devel mailing list