Am 07.12.2015 um 00:52 schrieb Allin Cottrell:
On Mon, 7 Dec 2015, oleg_komashko(a)ukr.net wrote:
> The behavior of exists() with strings is different. The more, there's
> difference across data types but not across the situations. Is this a
> bug or I missed something from the help?
It's a bug, now fixed in git. With strings, we have to be careful with
the notorious use/mention distinction (that is, "s" as string literal
versus 's' as the name of a string) and that was not done right for
exists().
This thing would of course be less "notorious" if the distinction were
more clearcut in gretl. I would be in favor of requiring string literals
explicitly in more places; as an example: cdf(N, -2.5) should be
cdf("N", -2.5). There are many more examples.
In some places the function doc also talks about "strings" where it's
really gretl identifiers (see argname, exists, isnull, varname, and
others probably). I've just noticed that there you can actually use
string literals instead of the plain identifier (as in argname(hey) and
argname("hey")), but I think that's actually a problem, and related to
Oleh's discovery.
Oh well,
sven