On Thu, 2 May 2019, Sven Schreiber wrote:
not sure why the following fails, given the documentation of
'argname':
<hansl>
function void ch(matrix m[null], string s[null])
if exists(m)
eval argname(m)
elif exists(s)
eval argname(s)
endif
end function
string s_in = "hey"
ch(, s_in) # error, expect "s_in"
This is due to an ambivalence specific to string variables. When gretl
finds
eval argname(s)
are we supposed to take the argument as the value of the string
variable named "s" (if there is one), or as the string literal "s"?
What happens at present is the former, so the question becomes:
What's the argname of "hey"? Hence the failure. If the argname check
is given as
eval argname("s")
it will work.
Allin