Hi, sometimes I was under the impression that hansl supports lazy evaluation of boolean expressions, and sometimes I thought that no, it doesn't. And turns out I was right because it seems to depend. Consider this:
<hansl>
clear # neither a nor b exist
eval 1==2 && a==b # lazy works, FALSE no matter what a
or b
eval 1==1 || a==b # lazy fails, even though it's always TRUE
</hansl>
For me a frequent use case for the OR case is a function argument check with a null default, something like:
if !exists(s) || s==""
So of the string argument s was passed into the function as 'null' the first part is TRUE, but gretl still goes on to check s=="" and then complains that s isn't defined.
I think it would be good to have lazy evaluation also in the OR case. Or --to make it less confusing-- ban it entirely, also for the AND case, although I'm not in favor of that.
I can think of some subtleties concerning NA values and lazy boolean evaluations, but then again, we already have it partly, so it doesn't seem to be so problematic.
cheers
sven