+problem with small const sets !

This commit is contained in:
pierre 1999-06-03 09:03:27 +00:00
parent 8064542fa2
commit bab0edbe32
2 changed files with 40 additions and 1 deletions

39
bugs/bug0258.pp Normal file
View File

@ -0,0 +1,39 @@
program test_set;
var error : boolean;
procedure test;
var
i : longint;
x : array [1..32] of byte;
begin
error:=false;
for i:=1 to 32 do x[i]:=$ff;
i:=1;
if i in [1,3,5,8,11,14,15] then
writeln('1 is in [1,3,5,8,11,14,15]')
else
writeln('Error in set');
i:=135;
if i in [1,3,5,8,11,14,15] then
begin
writeln('Error : 135 is in [1,3,5,8,11,14,15]');
error:=true;
end;
for i:=1 to 32 do x[i]:=0;
i:=135;
if i in [1,3,5,8,11,14,15] then
writeln('Second try Error : 135 is in [1,3,5,8,11,14,15]')
else
begin
if error then
writeln('Result of 135 in [1,3,5,8,11,14,15] depends on x array !!');
end;
end;
begin
test;
end.

View File

@ -350,4 +350,4 @@ bug0245.pp assigning pointers to address of consts is allowed (refused by BP !
bug0246.pp const para can be changed without error
bug0252.pp typecasting not possible within typed const
bug0255.pp internal error 10 with in and function calls
bug0258.pp bug in small const set extension to large sets