fpc/bugs/bug0021.pp
1998-03-25 11:26:49 +00:00

39 lines
782 B
ObjectPascal

{ tests constant set evalution }
var
a : set of byte;
const
b : set of byte = [0..255]+[9];
type
tcommandset = set of byte;
const
cmZoom = 10;
cmClose = 5;
cmResize = 8;
cmNext = 12;
cmPrev = 15;
CONST
CurCommandSet : TCommandSet = ([0..255] -
[cmZoom, cmClose, cmResize, cmNext, cmPrev]);
commands : tcommandset = [];
var
CommandSetChanged : boolean;
PROCEDURE DisableCommands (Commands: TCommandSet);
BEGIN
{$IFNDEF PPC_FPK} { FPK bug }
CommandSetChanged := CommandSetChanged OR
(CurCommandSet * Commands <> []); { Set changed flag }
{$ENDIF}
CurCommandSet := CurCommandSet - Commands; { Update command set }
END;
begin
a:=[byte(1)]+[byte(2)];
end.