Yet another point about the present 'if'
scalar x = exp($pi)
if x
is essentially if x!=0
string string_x = "exp($pi)"
if string_x
looks like
if strlen(string_x)
since string_x!=0 is unevaluable
Oleh
8 березня 2018, 11:26:54, від "Sven Schreiber" <svetosch(a)gmx.net>:
Am 08.03.2018 um 10:23 schrieb > oleg_komashko(a)ukr.net:
> It seems, there is nothing special
> about strstr:
...
> It looks like 'if' can evaluate non-empty string
> alone as 1 but can't evaluate logical expressions
> with string input
OK, thanks for pointing that out. I tend to think --apart from
backward-compatibility reasons-- that either stuff like 'if "a"' should
be banned, or the full logical implications should work as well.
thanks,
sven
_______________________________________________
Gretl-devel mailing list
Gretl-devel@lists.wfu.eduhttp://lists.wfu.edu/mailman/listinfo/gretl-devel