Thema: Delphi Set durchsuchen

Einzelnen Beitrag anzeigen

Muetze1
(Gast)

n/a Beiträge
 
#2

Re: Set durchsuchen

  Alt 3. Jul 2009, 20:50
Delphi-Quellcode:
type
  TEnum = (eA, eB, eC);
  TEnums = set of TEnum;

procedure DoIt(const ASet: TEnums);
var
  lIndex: TEnum;
begin
  for lIndex := low(TEnum) to high(TEnum) do
  begin
    if lIndex in ASet then
      DoSomething(lIndex);
  end;
end;
  Mit Zitat antworten Zitat