[Gretl-devel] 'include' w/o 'open' -- new behavior

Sven Schreiber svetosch at gmx.net
Thu Dec 13 17:23:44 EST 2007


Hi,

with 1.7.0 (and before that, too, I think) having an 'include' command 
in a script without an open datafile caused an error message along the 
lines "you have to open a datafile first".

(Which I assume is based on the fact that 'open' clears the internals of 
gretl and thus any user-defined functions would be wiped out, so it 
doesn't make too much sense to have 'include' first. On the other hand, 
with gretl's scripting capabilities evolving (for example matrix stuff) 
it's not clear that you always have a genuine need for a datafile when 
you write or run a script. So this "cleaning behavior" of 'open' and the 
above error message are becoming more and more awkward it seems -- 
unless I'm missing something, which is quite probable. But maybe 'open' 
should be re-factored into 'clear [workspace]' and 'load [datafile]' 
commands? But that is another story...)

Now with the latest snapshot I get a new dialog window popping up saying 
"couldn't open file xx.inp". The informative error message is gone, and 
it took me a while to figure out what was wrong.

thanks,
sven


More information about the Gretl-devel mailing list