On Fri, 5 Jun 2015, Henrique Andrade wrote:
Finally I wrote a small script that shows the problem with the "--preserve"
option (after using "run" and "open" commands the strings are
Please save the ."inp" files into the Gretl's working directory and
the "Problem with preserve option.inp" script.
2015-01-14 19:40 GMT-02:00 Allin Cottrell <cottrell(a)wfu.edu>:
> On Wed, 14 Jan 2015, Henrique Andrade wrote:
>> Em 14 de janeiro de 2015, Allin escreveu:
>>> On Wed, 14 Jan 2015, Henrique Andrade wrote:
>>>> Dear Gretl Team,
>>>> We can use the option "--preserve" with the "open"
command to preserve
>>>> matrices and scalars. I would like to ask you if it is possible to
>>>> strings too (so the "preserve" option will preserve matrices,
>>> Doesn't it preserve strings at present? It's in fact supposed to
>>> preserve all variables other than series.
>> It works, but not all the time ;-) Take a look at this code:
>> string s = "Hello, World!"
>> print s
>> open Australia.gdt
>> print s
> Erm, you forgot to use the --preserve option?
The way I see it, this is not a bug. By design, the "open" command
destroys the existing gretl session -- that is, deletes all variables
-- unless the --preserve option is given. In your setup, the file
open_data.inp calls the "open" command without the --preserve option,
so it is expected that no pre-existing variables will survive this