On Mon, 10 Jun 2013, Ignacio Diaz-Emparanza wrote:
I am creating a new function package and I have this error:
"Value "bundle" for attribute type of param is not among the enumerated
set"
what does it mean? I see no problem then with the created package, it seems
to work correctly.
It means you have a function that takes a straight bundle
argument rather than a bundle-pointer argument. That's
allowed, though it's not what you'd usually want to do. The
reason you saw that message is that the document type
definition for gretl packages, gretlfunc.dtd, did not include
the straight bundle type as a recognized parameter type. I've
now fixed that in CVS.
Why is it not what you'd usually want to do? If you use a
straight bundle arguent, the entire bundle is copied for use
by the function, and so no modifications inside the function
persist outside. Illustration:
<hansl>
function void bunfun (bundle b)
b.mat = I(3)
print b
end function
bundle b
bunfun(b)
print b
</hansl>
Of course, on some occasions you may actually want this
behavior, but generally efficiency favors using a
bundle-pointer argument.
Allin