"null" default for list arguments in function package
by Sven Schreiber
Hi,
as I'm debugging and trying to adapt the mentioned function package for
permanent-transitory decompositions I will probably be sending a couple
of emails with bug reports. (Also in spirit with the call for reporting
function packaging bugs at the conference.)
Ok, so here we go:
I have the following (example) function which specifies a "null" default
for an optional list argument:
function scalar defaultnullcheck(const list mylist[null])
print "nothing happening"
end function
If I package that function and call it in the GUI I don't get the "null"
default inserted in the place for the mylist argument. Instead another
list (probably the first that was created in the session) is inserted
there. I propose to insert the "null" keyword instead.
cheers,
sven
13 years, 3 months
"Changing & Saving" Session Issue
by Henrique Andrade
Dear Allin,
Let's suppose I have a Gretl session (.gretl) with saved models. If I create
periodic dummies Gretl doesn't let me save the session (the option under
"File -> Session files" is greyed out). The same behavior can be verified
when we try to create time index or change the sample. Is this an expected
behavior?
Best,
*Henrique C. de Andrade*
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge
13 years, 3 months
'smpl' in loop in function
by Sven Schreiber
Hi,
so I'm trying to make my function package work both with sub-sampled and
full-sampled data. This is not so easy because of gretl's behavior to
use pre-sample data for VAR/VECM estimation, if such data is available.
This means that the two cases (sub-sampled or not) have to be handled
differently. (IMHO this is bad, BTW, so taking up the issue which was
already discussed before, I still vote to always *prevent* gretl from
reaching back to pre-sample values.)
Anyway, so to deal with this issue I am using a couple of 'smpl'
shortening and re-enlarging commands in my functions, similar to the
following example:
<hansl>
function void samplecheck(int p)
smpl +p +0
loop 30
smpl -p +0
smpl +p +0
end loop
end function
samplecheck(3)
</hansl>
But I get an error message:
"Unrecognized sample command
*** error in function samplecheck"
Note that everything works fine if I don't use a loop in the example, so
the error message must be misleading.
thanks,
sven
13 years, 3 months