Am 02.12.2016 um 12:07 schrieb Artur T.:
Let me come back to yesterdays issue. I am trying to run the
following
check whether variable "time" is in the list rxlist, or not. When time
is not part of the list, I obtain the error message "error evaluating
'if'". However, I think gretl should simply return a zero in this case.
Yes it seems 'inlist()' has some problems. For example also 'eval
inlist(a, "s")' works (for 'a' as a defined list), although
according to
the doc a string as second argument wouldn't be allowed (should be an
identifier or an ID number).
The whole thing doesn't seem to be limited to "time", it's rather a
general issue about inlist() in functions -- the 'a.s' notation works in
one case but not in the other, and vice versa for the 's' notation.
Slightly OT: What are you trying to do, Artur? As a workaround you could
perhaps use:
if strstr(varname(rxlist), "time") != ""
(untested).
cheers,
sven