Am 16.09.2021 um 19:38 schrieb Riccardo (Jack) Lucchetti:
Hi all,
being the king of the typo has its advantages: for example, you find
weird bugs:
<hansl>
nulldata 60
setobs 4 1:1
y = normal()
ols y 0 y(0 -to -1) # note the typo
ols y 0 y(1)
</hansl>
The two models are identical.
Weird indeed...
Now, I don't want to hijack the thread, and so I changed the subject
line a little bit, but this special keyword "to" reminded me that in
different places in gretl/hansl there are different idioms or syntax
constructs for indicating a range:
(1) loop i = 1..N
(2) ols y const y(-1 to -3)
(3) seq(1, N)
OK, I admit that the last one is perhaps a little bit apart from the
others, but couldn't there be some harmonization?
Like "loop i = 1 to N", which is very nice to read, or the other way
around "ols y 0 y(-1 .. -3). I also wouldn't mind if {1..N} meant the
same thing as seq(1,N).
I know I know, all pure syntactic sugar and not strictly necessary, but
again: some harmonization might be nice.
Just a thought
Sven