Thorsten,
Your script runs fine for me on Windows 7 (64-bit, version 1.10.90cvs, build date
2015-07-31).
PS
-----Original Message-----
From: gretl-users-bounces(a)lists.wfu.edu [mailto:gretl-users-
bounces(a)lists.wfu.edu] On Behalf Of Wingenroth, Thorsten
Sent: Wednesday, August 05, 2015 5:07 PM
To: Gretl list
Subject: Re: [Gretl-users] Loop not automatically ending when error?
Thanks to all your responses. My Version is 1.10.0cvs under Windows. I noticed
that you even don't have to comment out. Just rerun the script and you get
alternating error messages.
I fixed my script now (see below), though it might still be a good idea to fix this
strange behavior if possible.
# preperations
include yahoo_get.gfn
nulldata 1800
setobs 5 2008-01-01 # a daily dataset should be already in place
# which stocks do you want to include?
string aktien = "TKA DAI"
# download the time series
print "Start downloading the stocks..."
loop foreach a @aktien
string ticker = "$a" ~ ".DE"
series $a = yahoo_price(ticker)
endloop
# process the time series
ldiff @aktien
-----Ursprüngliche Nachricht-----
Von: gretl-users-bounces(a)lists.wfu.edu [mailto:gretl-users-
bounces(a)lists.wfu.edu] Im Auftrag von Sven Schreiber
Gesendet: Mittwoch, 5. August 2015 18:47
An: gretl-users(a)lists.wfu.edu
Betreff: Re: [Gretl-users] Loop not automatically ending when error?
Am 05.08.2015 um 18:32 schrieb Wingenroth, Thorsten:
>
> I get the following error message:
>
>
>
>> set messages off
>
>>> # sample function call
>
>> nulldata 1800
>
> Sorry, this command is not available in loop mode
>
>
>
> Error executing script: halting
>
>> nulldata 1800
>
>
>
> But I am not in loop mode! And the command "nulldate" is not in the
> loop!
>
> To me, it seems that the loop is not finished when an error is raised.
>
Apart from the fact that it might be helpful to provide the version number, yes I
have experienced this behavior myself in the past. My personal term for it is
some remaining "flakiness" of gretl's command interpreter. As you suggest,
I
think it comes from a previous script that was aborted due to an error inside a
loop. Then gretl continues to think that the loop hasn't ended yet.
However, I'm not sure if this is still happening with recent versions, I think I
haven't seen this recently. Again, please provide the version you're using.
thanks,
sven
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users