About bug report 2181: why 9985 in [1, 2]? M := 9985; if M in [1, 2] then WriteLn…
Show quoted text 9 lines
About bug report 2181: why 9985 in [1, 2]?
M := 9985;
if M in [1, 2] then WriteLn ('Error!');
I tryed it with fpc 1.1. There is consistent pattern:
for m:= 1 to n do
if (m*256+x) in [x] then
writeln(m);
This is also how TP/Delphi handles it. We also got a bug report in the past that asked for this behaviour.
Compile with -Cr to get an error.
