(Gast)
n/a Beiträge
|
Re: Mini-Wettbewerb: Bedingter Vergleichs-Algo
2. Jun 2005, 15:26
Dann eben so ^^
Delphi-Quellcode:
type
TBspField = (bfA, bfB, bfC);
TBspFieldSet = set of TBspField;
function Compare(A, B: TBsp; Fields: TBspFieldSet): Boolean;
begin
Result := Fields <> [];
if bfA in Fields then Result := Result and (A.A = B.A);
if bfB in Fields then Result := Result and (A.B = B.B);
if bfC in Fields then Result := Result and (A.C = B.C);
end;
|
|
Zitat
|