数组和集合 / 无重复集合

type
  TByteSet = set of Byte;
  TCharSet = set of AnsiChar;

var
  IntSet: TByteSet;
  CharSet: TCharSet;
  B: Byte;
  C: AnsiChar;
begin
  //native sets hold ordinal values
  //(Byte, AnsiChar, enums), up to 256
  IntSet := [123];
  CharSet := ['A''B''C'];

  for B in IntSet do
    Write(B, ' ');
  WriteLn;

  for C in CharSet do
    Write(C, ' ');
  WriteLn;
end.