Allin Cottrell schrieb:
On Fri, 12 Feb 2010, Allin Cottrell wrote:
With annual data, the string representing a year is
indistinguishable from a string representing a general scalar. So
you can't reference observations by year in this context unless we
do the special thing of making the internal "obs" variable produce
the year instead of a 1-based index. And that's what we do right
now.
...
Anyway, I'm not sure what to do about this. Opinions welcome.
Starting with two caveats: I haven't followed this thread closely. And
not sure if what I'm saying is helpful. But here goes:
I think this is another example where the "sloppy" attitude of gretl
towards strings bites back. Because gretl is trying to accomodate a lot
of different usages (in a sense, trying to be "too user-friendly"), in a
script it's often not totally clear if a number literal is actually a
number or a camouflaged string literal. I venture the hypothesis that
life would actually be easier in the medium run if the user were
required to properly distinguish between the two. (Meaning that string
literals would always have to be properly indicated by quotes or
somesuch.) The confusing situation of @i and $i (where i is a loop index
variable) looks like another incarnation of this problem.
I'm wondering if for gretl 2.0 (or gretl 3000, or whatever) fundamental
design issues like this should be changed? Well maybe it's not feasible,
I don't know.
thanks,
sven