[Gretl-devel] freeze .... null default for matrices in packages editor

oleg_komashko at ukr.net oleg_komashko at ukr.net
Wed Apr 6 17:35:07 EDT 2016


> Anyone have reason why we should wait?

Dear Allin,
The package editor seems to not know yet
about new feature of matrices as a function
argument
When I try to package something like that

function void ma (scalar x , matrix m[null])
 isnm = isnull(m)
if isnm
print "null matrix"
else
print m
endif
end function

After saving the ma.gfn
The function becomes
function void ma (scalar x , matrix m)
i. e. "[null]" is autodeleted

Oleh





7 квітня 2016, 00:17:28, від "Allin Cottrell" <cottrell at wfu.edu>:

>   On Wed, 6 Apr 2016, Sven Schreiber wrote:
> 
> > Ok, I have found the (or at least one) reason for the crash, and it has 
> > nothing to do with the whole R-business. Here's a minimal (?) example that 
> > crashes for me every time:
> >
> > 
> > matrix m = ones(3,1)
> > ix = 1
> > loop 3	# must be bigger than the 2 in the if-clause
> >   if (ix <= 2) || (m[ix] > 0.5)
> >    print "hey"
> >   endif
> >   ix++
> > endloop
> > 
> >
> > Why do I always have to get these things? Sigh.
> 
> I can see why you're sighing. But anyway, thanks for bringing this 
> bug to light; I think it must have been lurking for quite a while. 
> it was to do with a subtle type-mixup between the two expressions 
> joined by "||" (OR). (I mean an internal mixup, nothing wrong with 
> your hansl code.) It's now fixed in git and snapshots.
> 
> BTW, I think we have by now accumulated more than enough bug-fixes 
> to justify a new release. Anyone have reason why we should wait?
> 
> Allin
> _______________________________________________
> Gretl-devel mailing list
> Gretl-devel at lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-devel
 
 


More information about the Gretl-devel mailing list