[Gretl-devel] Small bug

Marcin Błażejowski marcin at nsb.pl
Thu May 5 01:32:58 EDT 2011


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

But edit matrix 'foo' in "gretl: icon view" and then run FOO(foo)... 
oups, this is what I get:
----------------
? FOO(foo)


Variable number 2 is out of bounds
*** error in function FOO
 > printf "%d\n", nelem(mat)

Error executing script: halting
 > FOO(foo)
----------------

-- 
Marcin Błażejowski
http://www.wrzosy.nsb.pl/~marcin/
GG# 203127

-------------- next part --------------
A non-text attachment was scrubbed...
Name: marcin.vcf
Type: text/x-vcard
Size: 212 bytes
Desc: not available
Url : http://lists.wfu.edu/pipermail/gretl-devel/attachments/20110505/caaf469b/attachment.vcf 


More information about the Gretl-devel mailing list