tb0017.pp 923 B

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