On Mon, Jun 20, 2022 at 6:53 AM Sven Schreiber <svetosch(a)gmx.net> wrote:
Am 20.06.2022 um 07:59 schrieb Fred Engst:
>
> As I said before, I have a need to loop through quit a few .gretl files I get from
my students and to find something inside each of them, for example model outputs saved in
the .gretl files.
> I can’t do loops with .gretl files like I do with .gdt files.
> Here is a sample script:
Thanks for the example script. Here's a standalone version which doesn't
require other files on disk:
<hansl>
open denmark
store check1.gretl
store check2.gretl
loop i = 1..2
open "check$i.gretl" # also tried without quotes
endloop
</hansl>
This indeed sends the latest snapshot (on Win 10) into a non-responsive
state for me, the OS being needed to shut gretl down.
This sort of thing cannot work.
The non-responsiveness is now "fixed" in git and snapshots, in that an
attempt to open a session file within a loop produces an error
message. Besides using the GUI proper, you can open a session file via
command in the console, or at the top level of a script, but not in a
loop. By design, opening a session file clears out then repopulates
gretl's entire workspace, and doing so within a loop is bound to
destroy the integrity of the loop itself: after the first iteration
the loop-counter variable will have disappeared.
Allin