On Fri, 4 Nov 2016, Riccardo (Jack) Lucchetti wrote:
Folks, I'm puzzled. Look here:
<hansl>
nulldata 6
set seed 123
series x = uniform()
x[2] = NA
series z = ok(x) && (x < 0.5) ? x : 0
print x z -o
</hansl>
this produces
<output>
x z
1 0.2103124 0.2103124
2
3 0.0003299 0.0003299
4 0.5931556 0.000
5 0.9869412 0.000
6 0.6499468 0.000
</output>
Which is IMO wrong. I can see the logic in stipulating that anything
involving NAs is NA but OTOH I would say that ( 0 && NA ) should be 0.
OK, I take your point. In Boolean terms the logical product of
"false" and "indeterminate truth value" should be "false".
Fixed in
git.
Allin