On Mon, 27 Feb 2017, Artur Tarassow wrote:
I experienced this issue already in the past and I think it was also
discussed a while ago here in the forum. I still have problems to add a new
function to an existing package. To illustrate the example, I complied the
attached pdf trying to add the function DrawLoss2().
Until today, as a workaround, I completely re-created the package but of
course this is quite annoying and I am sure not intended :-)
Hope somebody could help with the issue.
I tried to replicate the problem as follows:
1) Downloaded your current FEP.zip for staging and unzipped it.
2) Ran a script that defined a function named DrawLoss2.
3) Opened FEP.gfn via /Tools/Function packages/Edit Package.
4) In the package editor, chose Add/Remove functions and added
DrawLoss2 to the public list. (Note: at this point I could
see on stderr:
original: finfo->n_pub=11, finfo->n_priv=5
revised: finfo->n_pub=12, finfo->n_priv=5
5) Again chose Add/Remove functions: DrawLoss2 appears in the
public list as expected.
I then quit gretl, restarted, and tried the same exercise again, but
this time loading FEP.gfn for editing before running the script that
defines DrawLoss2. The only difference this time was that DrawLoss2
appears as the last option on the left in the Add/Remove window.
After adding this function it "stayed added".
I then tried repeating the exercise again under valgrind, to see if
there was any reference to use of uninitialized variables or similar,
but didn't see anything.
So I'm still puzzled.