I have run into this problem too.  Especially, in a long script, it is easy to drop an end if or endloop. But I can also see that you might do something like this purposely. So as a comprise,  could a comand like endscript be added? That way if I have an erroneously unbalenced loop or if or whatever, getl will know that I am a dope and issue an error? 

The reason I suggest this is that when I have made this error,  gretl will normally execute the script without an error message on the first run, but throw what seems to be a random error the next run. So it takes a bit of head scratching to figure my goof up.

Logan 

Sent from my T-Mobile 4G LTE Device


-------- Original message --------
From: Jan Tille <Jan.Tille@absolut-research.de>
Date: 2015/12/12 3:22 PM (GMT-06:00)
To: r.lucchetti@univpm.it, Gretl list <gretl-users@lists.wfu.edu>
Subject: Re: [Gretl-users] gretl freezes

Jack,
Sven,

apologies for bothering you and the list with my blindness.
Nonetheless, thank you very much for granting support.
Jan

-----Ursprüngliche Nachricht-----
Von: Plus.line MailSystem [mailto:cyrus@mailer.plusline.de] Im Auftrag von Riccardo (Jack) Lucchetti
Gesendet: Samstag, 12. Dezember 2015 21:27
An: Gretl list <gretl-users@lists.wfu.edu>
Betreff: Re: [Gretl-users] gretl freezes

On Sat, 12 Dec 2015, Sven Schreiber wrote:

> Am 12.12.2015 um 21:06 schrieb Riccardo (Jack) Lucchetti:
>
>> Sorry, Jab, but it looks as if there's an "endloop" missing (I could
>> only count 3). That would explain why nothing runs: you'd still be
>> inside the outermorst loop.
>>
>> what happens if you open a console and issue an "endloop" command?
>>
>
> Well spotted -- but shouldn't gretl notice that it's pointless to wait
> for more commands at the end of the file and throw an error?
>
> (I'm aware that end-of-file itself is not sufficient, due to
> run/include and so on. But still.)

Good point.

In fact, there's a number of things we could do better (eg, optimize a few things for speed) if we had a means to determine if a certain piece of hansl code was meant to be run "on its own", so to speak.

In fact, this is what happens if you run a hansl file via "gretlcli -b".
Adding a warning like "warning: unterminated loop" is probably a good idea.


-------------------------------------------------------
   Riccardo (Jack) Lucchetti
   Dipartimento di Scienze Economiche e Sociali (DiSES)

   Università Politecnica delle Marche
   (formerly known as Università di Ancona)

   r.lucchetti@univpm.it
   http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------

_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users