Am 29.05.2013 18:09, schrieb Allin Cottrell:
On Wed, 29 May 2013, Allin Cottrell wrote:
I've now put a trivial but complete example at
http://users.wfu.edu/cottrell/pkg/
('setnote' still is a secret I guess -- although it vaguely rings a
bell, maybe it was discussed somewhere?)
Note that the main function, olsbundle(), calls the
bundle-print function to display its results. This is one way
of doing things. An alternative would be to include in
olsbundle() the special comment
Ok, thanks, I will try that (soon) -- what I don't understand here,
though, is why the bundle needs to be passed in pointer form. In this
example it looks just like a regular call (with a single argument) --
but well, there will be a reason I'm sure.
## no-print ##
(see section 6 in
http://gretl.sourceforge.net/papers/addons.pdf ) This signals
to gretl that the function does not print its own results, in
which case gretl will take care of calling the package's
bundle-print function. (We don't want both of these things to
happen.)
Somehow my feeling is that it would be good to not have this new syntax.
Or maybe it's the "mis-use" of the comment characters. Maybe instead a
specially named argument instead?
(Example:
function bundle olsbundle (series y, list X, bool addon_no_print[1]) )
thanks,
sven