Am 23.09.2019 um 10:57 schrieb Alecos Papadopoulos:
The Help says that
<<break: Break out of a loop. This command can be used only within a
loop; it causes command execution to break out of the current
(innermost) loop.>>
I tried to type the word "break" inside the loop command script while
the loop was running and then executing it. I first got the message "A
script is already running" and eventually Gretl crashed, loosing what
simulation work had been done up to then. Obviously I am doing this
wrong. Can somebody detail the exact micro-steps needed to use this
command?
Yes, you're doing it wrong, but of course that should only cause an
error message, not a gretl crash. So that is a bug (if it's a current
gretl version).
Apart from that, 'break' is not an interactive command - actually there
are no interactive commands in gretl AFAIK. Once a script is running,
it's running, and the only legal way to stop it is to press the red
button (in the GUI).
So 'break' is an algorithmic script command, like this:
<hansl>
strings as = defarray("where", "is", "the",
"first", "the", "?")
loop i = 1..nelem(as)
if as[i] == "the"
print "found it!"
break
endif
endloop
</hansl>
hth,
sven