type TCheckLineFunction = function(Line: String): Boolean; TStringListFunction = record FStrings: TStrings; constructor Create(Strings: TStrings); procedure DeleteLine(f: TCheckLineFunction); end; constructor TStringListFunction.Create(Strings: TStrings); begin FStrings := Strings; end; procedure TStringListFunction.DeleteLine(f: TCheckLineFunction); var i: Integer; begin for i := FStrings.Count - 1 downto 0 do begin if f(FStrings[i]) then begin FStrings.Delete(i); end; end; end;