bug0021.pp 782 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. { tests constant set evalution }
  2. var
  3. a : set of byte;
  4. const
  5. b : set of byte = [0..255]+[9];
  6. type
  7. tcommandset = set of byte;
  8. const
  9. cmZoom = 10;
  10. cmClose = 5;
  11. cmResize = 8;
  12. cmNext = 12;
  13. cmPrev = 15;
  14. CONST
  15. CurCommandSet : TCommandSet = ([0..255] -
  16. [cmZoom, cmClose, cmResize, cmNext, cmPrev]);
  17. commands : tcommandset = [];
  18. var
  19. CommandSetChanged : boolean;
  20. PROCEDURE DisableCommands (Commands: TCommandSet);
  21. BEGIN
  22. {$IFNDEF PPC_FPK} { FPK bug }
  23. CommandSetChanged := CommandSetChanged OR
  24. (CurCommandSet * Commands <> []); { Set changed flag }
  25. {$ENDIF}
  26. CurCommandSet := CurCommandSet - Commands; { Update command set }
  27. END;
  28. begin
  29. a:=[byte(1)]+[byte(2)];
  30. end.