Boolean operator "|" broken

Statements which use OR operator only parse as true if they are the first in written order, making the operator kind of useless.

Example (screenshots included):

It is 22:31, so df(hh)="22" evaluates as true, both logically and within KLWP. df(hh)="22" | "10" also evaluates as true; it is either 2200 or 1000 hour. For some godforsaken reason, though, df(hh)="10" | "22" does not parse as true, even though the statements should be functionally identical.

I double checked that this was not a matter of choosing a different df, as "h" produces the same result. In my screenshots, I used displaying the hour as a fail/else condition for my own sake, but its presence doesn't matter to the parser.

Your format appears to be wrong.

$if (
df(h) = 22 | df(h) = 10,TRUE,FALSE
)$

The way you have it written, it only works out as true for the first item because as far as the code is written that’s the only item being evaluated.

That is:

$if (
df(h) = 22 | 10,TRUE,FALSE
)$

will only be true if df(h) = 22 because there is no test after the or (|).

1 Like