On Mon, 24 Sep 2018, Sven Schreiber wrote:
> What should we do? It would be easy to enforce the documented
count loop
> syntax -- and therefore flag a syntax error up-front in this case. But I
> wonder if there's any usage of the extended count-loop syntax out there
> among extant hansl scripts. The sort of thing one might reasonably expect
> to work (even though it's contrary to doc) would be, "loop K/2",
"loop N-M"
> and such.
In principle using an expression there could indeed be useful. What would
already be helpful is gretl saying something like "failed to evaluate loop
count expression, object i is undefined", or similar.
It could be _marginally_ useful; the only case when I use count loops is
when I have to time things so some repetition is needed. Otherwise,
looping without being able to access the index is pretty useless to me.
If we want to allow
loop A/B
in place of
scalar C = A/B
loop C
I'd be fine with this, provided it's not too much work for the tokenizer.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------