On Fri, 16 Jan 2015, Artur T. wrote:
Hi all,
in the past this used to work:
<hansl>
open denmark.gdt -q
list X = LRM LRY
loop i=1..2 -q
string vname = varname(X[i])
print vname
endloop
</hansl>
However, using current cvs on Ubuntu, I get the error:
"varname: argument should be scalar, is series
Data types not conformable for operation"
Did I miss some recent changes, or is it a bug?
It's a recent change; see
http://lists.wfu.edu/pipermail/gretl-users/2015-January/010568.html
The syntax Listname[i] now gives you the series at position i in the
list (previously there was no direct way of getting that). To get the
series ID number you have to "cast" the list to a matrix:
<hansl>
open denmark.gdt -q
list X = LRM LRY
matrix Xm = X
loop i=1..2 -q
string vname = varname(Xm[i])
print vname
endloop
</hansl>
Allin