Why does the below code result in true if type = 7 and seq = 224?
RPGLE free form:
if (type = 6 or
type = 7 or
type = 9) and
not (seq = 224 or seq=249);
I had to rewrite it to:
if (type = 6 or
type = 7 or
type = 9) and
seq <> 224 and
seq <> 249;
but why? I am guessing it has something to do with the NOT operator.
Well,
NOT
has a higher precedence thanAND
orOR
RPG IV Reference manual operator precedenceHowever, the expression you show should evaluate to false...
Joblog shows: