Am 19.08.2016 um 01:24 schrieb Summers, Peter:
The problem is where your "nulldata" command is. In the
first
version, it wipes out the array declaration. You should either put
that command first or use the --preserve option for it (ie, "nulldata
10 --preserve") which will keep previously declared variables (I
think arrays are preserved, but I could be wrong about that).
I think they should also be preserved and if not, it would be a bug in
my view. (Too lazy to test right now.)
But with respect to "nulldata", I think the reason that it destroys
previously defined variables by default is just historical. I would be
in favor of changing the default because that seems to be a common
source of errors and misunderstandings. However, since I'm also known to
value backwards compatibility my suggestion is to introduce a new option
to "nulldata", namely something like "--reset-session".
This new option would currently not actually do anything because it
would be equivalent to the default. But in the user guide it could be
presented as good practice and it would make it clear what's happening.
Later on some warning could be issued by gretl when "nulldata" is used
without any option, explaining that the default behavior might be
changed sometime in the future. (But this second step is optional.)
cheers,
sven