interestingly, even the following gives a warning:
const
a = word(128);
b = word(64);
c = word(a or b);
d = byte(not c); // Warning: range check error ... (-193)
e = word(not c);
f = byte(e); // Warning: range check error ... (65343)
g = byte(lo(e));
unit1.pas(56,8) Warning: range check error while evaluating constants (-193 must be between 0 and 255)
^^^^(56 = line 5 in the code above)
unit1.pas(58,7) Warning: range check error while evaluating constants (65343 must be between 0 and 255)
^^^^(58 = line 7 in the code above)
The code produces the following output (Win 10, 64bit)
a = 128
b = 64
c = 192
d = 63
e = 65343
f = 63
g = 63
cheers
S.