Il 12/06/2025 12:35, Sven Schreiber ha
scritto:
Am
12.06.2025 um 12:26 schrieb Riccardo (Jack) Lucchetti:
On 12/06/25 11:45, Sven Schreiber wrote:
Paolo, are you saving to a session file? Functions that were
defined at the time of saving are restored when the session
file is re-opened.
Could that be the case?
That's a very clever and plausible hypothesis, I wasn't really
aware of this behavior. Let's see if Paolo confirms this.
Apart from that, after opening the session file, one could
perhaps do "clear --functions".
Alternatively, we could warn the user with a GUI element
containing a message like "WARNING: the session file you're
opening contains one or more used-defined functions. Restoring
them may not be what you want. Do you want to restore the
user-defined functions?" and a Yes/No button.
It may be a little annoying, though.
I think that would be over-engineering, actually. However, I'm
noting that in section 3.4 of the guide ("The Session concept")
the behavior with respect to functions isn't mentioned, maybe it
should be.
Also, Paolo's original problem was that his new function
definitions were rejected because of the existing ones. Perhaps
the associated warning message could contain a hint about how to
unload/delete the existing function, if that's what's wanted.
The warning message does not give particular details:
> function bundle
svm_qml(series returns "returns",...)
The function svm_qml is already defined by package 'svm_qml' (yet, I just deleted that function!!)
Error executing script: halting
> function bundle svm_qml(series returns "returns", ...)
cheers
sven
_______________________________________________
Gretl-users mailing list -- gretl-users@gretlml.univpm.it
To unsubscribe send an email to
gretl-users-leave@gretlml.univpm.it
Website:
https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/
--
Paolo Chirico
RU e Prof.Agg. di Statistica Economica
Università del Piemonte Orientale
Dip. di Giurisprudenza e Scienze Politiche,
Economiche e Sociali (DIGSPES)
Alessandria, Italia